From 8e81b6c645010807b92ad5807e3a12a391488eff Mon Sep 17 00:00:00 2001 From: uramer Date: Sat, 19 Mar 2022 21:26:02 +0100 Subject: [PATCH] Fix updating UI image resource --- components/lua_ui/image.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/lua_ui/image.cpp b/components/lua_ui/image.cpp index 69bccac1ed..7eeca1dc0e 100644 --- a/components/lua_ui/image.cpp +++ b/components/lua_ui/image.cpp @@ -35,6 +35,7 @@ namespace LuaUi void LuaImage::updateProperties() { + deleteAllItems(); TextureResource* resource = propertyValue("resource", nullptr); MyGUI::IntCoord atlasCoord; if (resource) @@ -59,6 +60,7 @@ namespace LuaUi tileH ? textureSize.width : 0, tileV ? textureSize.height : 0 )); + setImageTile(textureSize); if (atlasCoord.width == 0) atlasCoord.width = textureSize.width;