Page 1 of 1
Read access for LuaGuiElement.width and height (or LuaGuiElement.style.width)
Posted: Thu Dec 04, 2025 4:24 am
by protocol_1903
As in title, I want to be able to find out the current width and height of a LuiGuiElement. It doesn't quite make sense to access via LuaStyle but that might be the better place for it. Specifically, I want to know what the width/height is based on the style settings (padding, margins, natural_width, minimum, maximum).
Re: Read access for LuaGuiElement.width and height (or LuaGuiElement.style.width)
Posted: Tue Dec 09, 2025 2:53 pm
by Rseding91
The current width/height of a GUI element is not available for mods to read because it's not part of the game state (it only exists for the player viewing the GUI). If we were to make it part of the game state then we would need to sync it through the multiplayer networking system for every player every time any of them change size.
That is currently not something we're interested in doing.