Skip to content

Commit

Permalink
Fixed images displaying the initial texture when the texture callback…
Browse files Browse the repository at this point in the history
… starts returning null
  • Loading branch information
Ellpeck committed Jan 2, 2025
1 parent 5fa0530 commit dee825e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion MLEM.Ui/Elements/Image.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ public Image(Anchor anchor, Vector2 size, TextureRegion texture, bool scaleToIma
/// <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;
Expand Down

0 comments on commit dee825e

Please sign in to comment.