Page 1 of 1

Relative gui to anything

Posted: Fri Jul 10, 2026 10:35 am
by Gergely
What
Add a way to specify a gui anchor to make a gui element appear next to whatever gui the player currently has open, regardless of it's type.
Why?
In case the mod/script does not care what kind of relative gui the player has open, just that something is shown, it is very difficult to determine what the value of GuiAnchor::gui should be for the gui to show up.
Additional considerations
For my purposes I would prefer if my gui stuck along as the player switches gui type: For example when they open an assembling machine and select a recipe the gui type changes and I would like for my gui to remain active. However alternatives are up for consideration such as LuaPlayer::opened_relative_gui_type read to tell the currently visible relative gui. (In which case also add it to the on_gui_opened event and add support for detecting when it changes.)