An API for the GUI

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

User avatar
Ghoulish
Filter Inserter
Filter Inserter
Posts: 468
Joined: Fri Oct 16, 2015 8:40 am

An API for the GUI

Post by Ghoulish »

Forum member MrDrummer has a tool belt mod https://forums.factorio.com/forum/vie ... 92&t=17033 I asked if it were possible to alter the dimensions of the tool belt so that rather than have 2 blocks of 5 (and additional tool belts added vertically) To have a tool belt of 2 blocks of 10. This would spread out the UI across the bottom of the screen and at least in my humble opinion is a more natural or standard UI design that we have all become accustomed too over the years.
MrDrummer wrote:Pretty sure this is not something I can alter easily... I am pretty sure the tool-belt as we know it is hard-coded in terms of width/functionality other than how many rows we have. Even if I did a GUI there are still some things that i am not sure about/will not work for sure, i.e. toolbelt swapping and actually getting the GUI to save the values as you would expect.
I am certainly not the one who is able to do the above (novice Lua programmer here), though I would either make a suggestion for a mod to do this or suggest it for 0.13.
I tend to have main slots set to specific items, then leave at least 15 slots free for blueprints and any other item depending on what you are doing.
Thanks for the suggestion :)
So I would firstly like to check that the UI is hard coded? And if so firstly propose that a wider spread out tool belt (2 blocks of ten, or more buttons) Would be a better design.

And secondly evolve this idea further to have an Application Programming Interface for the UI, so the community could then design their own layouts. And from judging the quality of mods this community already produces.. Well hell I can hardly wait to see what they come up with! :) I do understand a change like this is not a simple task, but feel it would be a positive step forward in Factorio development. And this is why. Look at the early days of World of Warcraft. The UI was up to Blizzard usual high standards, and fully functional, but because the community could tinker with the code through lua, over time some pretty epic addons/mods were released, and the point here is that Blizzard then integrated those ideas in to vanilla, for example scrolling combat text, or much later quest logging. The best the many minds of the community could come up with was given to all. And more than this led to mods which added awesome levels of customisation, should you wish - complexity that would be over the top for vanilla.

Think of all of the cool layouts you could have, simple access to features directly off the tool belt. Options, blue prints, settings. Whatever you may happen to want, or neglect. An API for the UI would be a positive step for Factorio.

(edit: Steampunk themed Factorio layout anyone?)
Last edited by Ghoulish on Sat Jan 30, 2016 4:00 pm, edited 1 time in total.
See the daily™ struggles with my Factory! :D https://www.twitch.tv/repetitivebeats
Zeblote
Filter Inserter
Filter Inserter
Posts: 973
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: An API for the GUI

Post by Zeblote »

All the guis you see in factorio are hard coded using their internal gui library, in c++. None of them can be modified by mods.
Oh, and you can't even use the gui library in your mods. Only very few elements are exposed, like you can't even make a scroll bar.

Quite honestly, the current gui api for mods is a joke.
keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: An API for the GUI

Post by keyboardhack »

Zeblote wrote:All the guis you see in factorio are hard coded using their internal gui library, in c++. None of them can be modified by mods.
That's not really true. Go to data\core\prototypes\styles.lua
In there you can change the menus styles, positions, colors, etc.
Waste of bytes : P
Zeblote
Filter Inserter
Filter Inserter
Posts: 973
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: An API for the GUI

Post by Zeblote »

keyboardhack wrote:
Zeblote wrote:All the guis you see in factorio are hard coded using their internal gui library, in c++. None of them can be modified by mods.
That's not really true. Go to data\core\prototypes\styles.lua
In there you can change the menus styles, positions, colors, etc.
Yeah, I guess you can change the style. But not while the game is running and you can't change anything else, like add new elements.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: An API for the GUI

Post by ssilk »

Because that is not done like so. :) See current HTML5 etc: The interfaces works with layers/divs. If you want to show another content you swap the layers/divs (whatever), instead of changing the current.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
Ghoulish
Filter Inserter
Filter Inserter
Posts: 468
Joined: Fri Oct 16, 2015 8:40 am

Re: An API for the GUI

Post by Ghoulish »

Point taken ssilk.

It is a shame though, I do want to ask if there are plans to update the GUI, or is it more a polish thing to come down the line? It would be great to be able to change the layout of toolbelts/bars for example (are there plans for this?). Or even to be able to choose where various windows open and then lock them in place, the main UI window always opening slap bang center of screen.. It's not like it's annoying, but shouldn't I be able to move the window if I prefer? Couldn't we be given options when it comes to UI layout?

The research screen is less than intuitive too, trying to figure out the research you need to do before you can get X or Y is a bit of a minefield, and comes through experience rather than the UI clearly showing various paths.
See the daily™ struggles with my Factory! :D https://www.twitch.tv/repetitivebeats
User avatar
Smarty
Global Moderator
Global Moderator
Posts: 816
Joined: Sat Oct 04, 2014 5:00 pm
Contact:

Re: An API for the GUI

Post by Smarty »

Post Reply

Return to “Ideas and Suggestions”