mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-23 01:21:57 -05:00
Do not recreate block info texture when selected index hasn't changed.
This commit is contained in:
parent
1278d34c24
commit
acf2c849dd
1 changed files with 4 additions and 0 deletions
|
@ -120,7 +120,11 @@ namespace ClassicalSharp {
|
|||
}
|
||||
}
|
||||
|
||||
int lastCreatedIndex = -1000;
|
||||
void RecreateBlockInfoTexture() {
|
||||
if( selectedIndex == lastCreatedIndex ) return;
|
||||
lastCreatedIndex = selectedIndex;
|
||||
|
||||
GraphicsApi.DeleteTexture( ref blockInfoTexture );
|
||||
if( selectedIndex == -1 ) return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue