GUI's should be attached to a main flow prototype
Posted: Thu Sep 15, 2016 7:35 am
Mods that add gui's can be a nightmare, they are created on a first come first serve basis, So I propose this slight change to way Gui's are added:
A main flow needs to be defined in the data stage something like this
{
type = "mod-gui-flow"
name = "flow_name"
-- direction is inherited from location when used
}
When a mod wants to add a new gui to the root gui it needs to be added with the additional mod-gui-flow
player.gui.top.flow_name.add{}
Now you are probably thinking, what it the world is the point of this!
Well let say MOD-B wants its buttons to next to MOD-A if MOD-A is installed
Both mods would define the same mod-gui-flow.flow_name and anytime the buttons are added they will be attached to the mod-flow. Since it is defined in the data stage it would be just like the top level flows and always available.
Anyways just some rambling, let me know what you think!
A main flow needs to be defined in the data stage something like this
{
type = "mod-gui-flow"
name = "flow_name"
-- direction is inherited from location when used
}
When a mod wants to add a new gui to the root gui it needs to be added with the additional mod-gui-flow
player.gui.top.flow_name.add{}
Now you are probably thinking, what it the world is the point of this!
Well let say MOD-B wants its buttons to next to MOD-A if MOD-A is installed
Both mods would define the same mod-gui-flow.flow_name and anytime the buttons are added they will be attached to the mod-flow. Since it is defined in the data stage it would be just like the top level flows and always available.
Anyways just some rambling, let me know what you think!