1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2025-01-07 06:57:43 +01:00

Fixed images displaying the initial texture when the texture callback starts returning null

This commit is contained in:
Ell 2025-01-02 17:06:02 +01:00
parent 5fa0530303
commit dee825e503
2 changed files with 1 additions and 1 deletions

View file

@ -46,6 +46,7 @@ Fixes
- Fixed a stack overflow exception when a panel's children have just enough height to cause a scroll bar to appear
- Fixed AddedToUi and RemovedFromUi being called for freshly added or removed children whose parents are not in a ui system
- Fixed UiParser ImageExceptionHandler being ignored when an exception occurs during texture construction
- Fixed images displaying the initial texture when the texture callback starts returning null
### MLEM.Data
Improvements

View file

@ -125,7 +125,6 @@ namespace MLEM.Ui.Elements {
/// <inheritdoc cref="Image(Anchor,Vector2,TextureRegion,bool)"/>
public Image(Anchor anchor, Vector2 size, TextureCallback getTextureCallback, bool scaleToImage = false) : base(anchor, size) {
this.GetTextureCallback = getTextureCallback;
this.Texture = getTextureCallback(this);
this.ScaleToImage = scaleToImage;
this.CanBeSelected = false;
this.CanBeMoused = false;