Page 1 of 1

Mod Toolbar

Posted: Sat Aug 11, 2018 3:18 am
by Pinga
Currently there's no standard way for mods to create their own buttons in the UI, so each one put it wherever they like.

Examples:
bad1.png
bad1.png (53.54 KiB) Viewed 1131 times
bad2.png
bad2.png (34.82 KiB) Viewed 1131 times
While not super high priority, it would be interesting it they had a standard and more organic way to integrate in the UI. One idea is: since we are going to have a CTRL-C / CTRL-V toolbar, maybe that could be extensible so mods add their own buttons. Maybe extend the already existing upper right toolbar above the minimap. 0.17 is revamping the UI, and looks like a good time to define this.

A good example: most browsers let addons put their buttons in the toolbar alongside the standard ones, and allows them to show information, can be reordered and have separators.
good1.png
good1.png (3.06 KiB) Viewed 1131 times

Re: Mod Toolbar

Posted: Sat Aug 11, 2018 11:55 am
by Ghoulish
I hope this will be fixed in the coming gui rework, it needs a uniform size and style with equal positioning that scales with any change to UI scale.
Untitled4ytvg24tuy24b5.png
Untitled4ytvg24tuy24b5.png (105.72 KiB) Viewed 1113 times
The text in the middle of the buttons looks ugly imho too, I guess the ordering is related to the mod load order? Not overly sure of a cleaner implementation though, perhaps buttons first left to right, then the text field(s), perhaps even force all mods to use buttons which would then toggle / shows whatever. I'm sure I read kovarex mention this at some point, somewhere.. Hope it's on the to do list.

Re: Mod Toolbar

Posted: Sat Aug 11, 2018 12:03 pm
by Klonan
Pinga wrote:Currently there's no standard way for mods to create their own buttons in the UI, so each one put it wherever they like.
There is the mod_gui library, which allows mods to put the buttons in the same flow with uniform spacing and style, as you can see in the first 3 buttons in this screenshot:

Image

You will need to coerce the mod authors to actually use the system

Re: Mod Toolbar

Posted: Mon Aug 13, 2018 7:08 am
by eradicator
Klonan wrote:You will need to coerce the mod authors to actually use the system
I bet 10M green circuits on "ain't ever gonna happen".

@OP:
From what i've seen of other mods GUIs so far this is not really a problem of that one button in the corner. Even the popular ones look like the author made the GUI up the the point where it barely works, and spent exactly no time on making it look nice. I think the main reason is that making a well looking GUI simply requires alot of time and effort, possibly more than the rest of a medium sized mod (respect to the wube team ;). Also i've heared people talk about mod GUIs as "black magic", suggesting that at least some modders are simply scared of writing GUI code and want to get done with it as fast as possible :).

Also the base games mod "button" methaphor only works for basic static buttons, something like expanding menus when clicking the button (like the "text box" in your screenshot), or dynamic buttons isn't supported (because it would break style again).

So yea, your "best" chance is naggin every single mod author and send them pull requests if you want normalized buttons.

@Klonan:
Btw, was there any progress on introducing a mechanism to change the order of gui elements after creation? A simple swap() would allow creation of a mod that allows customizing the button order.