mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 20:58:34 +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
|
Improvements
|
||||||
- Allow comparing Keybind and Combination based on the amount of modifiers they have
|
- 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
|
### MLEM.Ui
|
||||||
Additions
|
Additions
|
||||||
- Added Element.AutoNavGroup which allows forming groups for auto-navigation
|
- Added Element.AutoNavGroup which allows forming groups for auto-navigation
|
||||||
|
|
|
@ -337,6 +337,8 @@ namespace MLEM.Graphics {
|
||||||
if (!this.batching)
|
if (!this.batching)
|
||||||
throw new InvalidOperationException("Not batching");
|
throw new InvalidOperationException("Not batching");
|
||||||
if (this.items.Remove(item)) {
|
if (this.items.Remove(item)) {
|
||||||
|
if (this.items.Count <= 0)
|
||||||
|
this.texture = null;
|
||||||
this.batchChanged = true;
|
this.batchChanged = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue