[kovarex] [0.17.14] Modded GUI components ignore scaling when style.width attribute is set
Posted: Mon Mar 18, 2019 3:27 pm
Edit: Initial description was wrong, see post below.
When a modded UI element is hidden while players change their UI scaling setting, For GUI elements with style.width set to a specific value, the width of the element in question is not resized according to the interface scaling setting. When making the UI elements visible at a later point in time, they retain their incorrect scaling. At that point, the only way to enforce proper scaling is to destroy and rebuild them. Other properties like height or font size scale correctly.
Background:
LTN Tracker adds a UI that is closed most of the time. It is created once at the start of the game with the root element set to be invisible (via the .style.visible property). At that point, toggling the UI on and off in lua is as easy as setting a single property to true/false. This method worked perfectly in 0.16 and mostly still does. But 0.17 introduced the issue described above.
Some screenshots below. If needed I will code a minimal working example.
Background:
LTN Tracker adds a UI that is closed most of the time. It is created once at the start of the game with the root element set to be invisible (via the .style.visible property). At that point, toggling the UI on and off in lua is as easy as setting a single property to true/false. This method worked perfectly in 0.16 and mostly still does. But 0.17 introduced the issue described above.
Some screenshots below. If needed I will code a minimal working example.