1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00

Fix updating UI image resource

This commit is contained in:
uramer 2022-03-19 21:26:02 +01:00
parent 5728bfeb49
commit 8e81b6c645

View File

@ -35,6 +35,7 @@ namespace LuaUi
void LuaImage::updateProperties()
{
deleteAllItems();
TextureResource* resource = propertyValue<TextureResource*>("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;