Page 1 of 1

[Rseding91] [2.0.42] LuaGuiElement doesn't update layout after toggling visibility

Posted: Mon Mar 31, 2025 4:53 am
by sOvr9000
03-30-2025, 21-23-26.png
03-30-2025, 21-23-26.png (9.39 KiB) Viewed 369 times
03-30-2025, 21-24-01.png
03-30-2025, 21-24-01.png (8.57 KiB) Viewed 369 times
In one image, the layout is working as expected. In the other image, the layout is incorrect, as you can see the line going through the sprite button.
On top of the layout being incorrect, the "Claim Hex" button is not clickable and its color does not change on hover (when it should).
Sometimes, it is possible to press Ctrl+F5 to force it to update the layout, which then fixes it and makes the button clickable, but that doesn't work every time. There was a time when the game autosaved, and then Ctrl+F5 worked. (yes, this is a very strange bug)

What happened from clean layout to the broken layout was that the button and the flow with the sprite button were set to visible = false. Upon setting them back to visible = true, the whole layout is incorrect.

Exact steps to reproduce:
1. Download and enable mod "Hextorio - Build in hexagons" (attached to this post)
2. Start a new game with default map and mod settings.
3. Tab past the intro dialogue.
4. Click on the "Hex Core" entity that you spawn inside of.
5. Click on the "Claim Hex" button.
(the elements become hidden)
6. Close the Hex Core / inventory GUI.
7. Enter map view.
8. Click on any of the newly spawned "Hex Core" entities to open their Hex Core GUI.
(the elements reappear, but the layout is not updated and the button can't be clicked)
9. Pressing Ctrl+F5 sometimes fixes the layout and makes the button become clickable again.

Re: [Rseding91] [2.0.42] LuaGuiElement doesn't update layout after toggling visibility

Posted: Mon Mar 31, 2025 5:30 pm
by Rseding91
Thanks for the report. This is now fixed for the next release.