relative_gui_type for pumps?
relative_gui_type for pumps?
What is the relative_gui_type for pump GUI? I can't seem to find it in the list in the docs.
Re: relative_gui_type for pumps?
Might be missing. But have you gotten any other of the relative GUIs to work? I'm trying to add a button to the Artillery Wagon GUI. It runs without error, and clearly thinks it's creating a LuaGuiElement, but I can't see it anywhere on the screen. If I change "relative" to "left" then it works.
This is inside the on_gui_opened event when the entity gui opened is type "artillery-wagon".
Code: Select all
player.gui.relative.add{type="button", name="saw-upgrade-button", caption="Enable Autofire",
anchor={gui=defines.relative_gui_type.train_gui, position=defines.relative_gui_position.right}}
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Re: relative_gui_type for pumps?
train_gui is for the locomotive/schedule gui
looking at the defines it looks like pumps,wagons (all 3) and turrets are missing
Don't add it in on_gui_opened. You can just create it when the player is created. It only shows up when the correct gui is open and doesn't get destroyed when that gui is closed (unless another mod does it)
Edit: Rseding says its defines.relative_gui_type.container_gui for the artillery
looking at the defines it looks like pumps,
Don't add it in on_gui_opened. You can just create it when the player is created. It only shows up when the correct gui is open and doesn't get destroyed when that gui is closed (unless another mod does it)
Edit: Rseding says its defines.relative_gui_type.container_gui for the artillery