mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 04:53:29 +01:00
Fixed StaticSpriteBatch not resetting its texture when all items are removed
This commit is contained in:
parent
42993f1a0b
commit
7d9633d989
2 changed files with 5 additions and 0 deletions
|
@ -21,6 +21,9 @@ Additions
|
|||
Improvements
|
||||
- Allow comparing Keybind and Combination based on the amount of modifiers they have
|
||||
|
||||
Fixes
|
||||
- Fixed StaticSpriteBatch not resetting its texture when all items are removed
|
||||
|
||||
### MLEM.Ui
|
||||
Additions
|
||||
- Added Element.AutoNavGroup which allows forming groups for auto-navigation
|
||||
|
|
|
@ -337,6 +337,8 @@ namespace MLEM.Graphics {
|
|||
if (!this.batching)
|
||||
throw new InvalidOperationException("Not batching");
|
||||
if (this.items.Remove(item)) {
|
||||
if (this.items.Count <= 0)
|
||||
this.texture = null;
|
||||
this.batchChanged = true;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue