1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-30 14:06:41 +00:00

Merge branch 'fix_image' into 'master'

Fix updating UI image resource

See merge request OpenMW/openmw!1719
This commit is contained in:
Petr Mikheev 2022-03-19 22:35:06 +00:00
commit cffd5d14ae

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;