Page 1 of 1

Attaching relative gui to train (locomotive) GUI

Posted: Wed Jun 03, 2026 5:37 am
by hgschmie
according to all documentation (and the interwebs), this used to work in Factorio 1.1:


-- add an anchor to the topmost frame
anchor = {
gui = defines.relative_gui_type.train_gui,
position = defines.relative_gui_position.top,
},


and then attach this to `player.gui.relative` and you can get a (probably only very small) custom GUI attached to the main locomotive GUI.

This no longer seems to work in 2.0. Any attempt to open a custom GUI, it ends up in the middle of the screen. Looking through the forums I did not find anything and claude speculates that this has to do with the train_gui being fullscreen and therefore the engine unable to render the helper GUI.

Is that true? Is it not possible to attach a gui in a reasonable way to the train gui? Or what would one do? Grateful for any pointers.

Re: Attaching relative gui to train (locomotive) GUI

Posted: Wed Jun 03, 2026 4:05 pm
by Stringweasel
+1

This would be really useful for Space Exploration. Currently we need to place a floating GUI at the right pixel location, including accomodating for the schedule GUI being wider sometimes.