Relative GUI for static GUI elements

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 708
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Relative GUI for static GUI elements

Post by raiguard »

Just throwing this out there: It would be stupendously amazing if we could position GUI elements relative to the "static" GUI elements that are almost always shown. For example, the top-right GUI, the quickbar, shortcut bar, guns/ammo GUI, map editor GUI, etc. Right now it is possible to position elements like this by using hardcoded constants combined with display resolution and scale, but it is a very ugly method that is prone to error.

Thanks!
Don't forget, you're here forever.
PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Re: Relative GUI for static GUI elements

Post by PFQNiet »

+1

I would love to attach some gui to the hotbar, such as a custom additional progress bar (alongside health, shield, mining progress...) and other uses.
User avatar
SupplyDepoo
Filter Inserter
Filter Inserter
Posts: 307
Joined: Sat Oct 29, 2016 8:42 pm
Contact:

Re: Relative GUI for static GUI elements

Post by SupplyDepoo »

Is this possible yet?
i142857
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Nov 04, 2024 9:56 am
Contact:

Re: Relative GUI for static GUI elements

Post by i142857 »

+1 maybe now that raiguard is on the other side of the "fence"? :)

The relative gui system is so cool and it's so annoying to fall back to easily broken coordinate hacks :(
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 445
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: Relative GUI for static GUI elements

Post by ownlyme »

we already have player.gui.relative.add(...) .anchor = https://lua-api.factorio.com/latest/def ... e_gui_type

what we REALLY need is displaying these relative guis *above* the anchor gui.
currently they can only be displayed to the side...
for example you could display a bunch of extra stats in a crafting machine window, or i didn't need to manually calculate the inventory position for my https://mods.factorio.com/mod/market2 which is a HUGE hassle, doesnt look perfect and is generally a ridiculous solution.

that's what i tried to propose in player.gui.relative[].bring_to_front() ?
maybe i didn't explain it well

I've been waiting for this for 3 years. PLEASE make it happen
creator of 55 mods
My api requests/suggestions: ui relative for overlay||Grenade arc||Player Modifiers||textbox::selection||Singleplayer RCON||disable car's ground sounds
User avatar
picklock
Fast Inserter
Fast Inserter
Posts: 239
Joined: Sat Nov 09, 2019 6:49 am
Contact:

Re: Relative GUI for static GUI elements

Post by picklock »

+1

I also want an possibillity to displaying these relative guis *above* the anchor gui.
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 445
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: Relative GUI for static GUI elements

Post by ownlyme »

oh sorry, now i understand what you meant.
defines.relative_gui_type doesn't contain the quickbar, the weapon box, the map etc yet

was about to make a ui for induction charging and wanted to attach it to the weapons because that's where the battery is
creator of 55 mods
My api requests/suggestions: ui relative for overlay||Grenade arc||Player Modifiers||textbox::selection||Singleplayer RCON||disable car's ground sounds
User avatar
Fabriken AGI
Inserter
Inserter
Posts: 31
Joined: Tue Nov 12, 2024 8:39 pm
Contact:

Re: Relative GUI for static GUI elements

Post by Fabriken AGI »

raiguard wrote: Tue May 04, 2021 6:47 pm Just throwing this out there: It would be stupendously amazing if we could position GUI elements relative to the "static" GUI elements that are almost always shown. For example, the top-right GUI, the quickbar, shortcut bar, guns/ammo GUI, map editor GUI, etc. Right now it is possible to position elements like this by using hardcoded constants combined with display resolution and scale, but it is a very ugly method that is prone to error.

Thanks!
I Agree. You mean like CSS's position: and align: ? Maybe in combination with some markup-like language for defining gui-hierarcies, sprinkled with inspiration from XAML/UWP?

Controversal take: hide the existing gui and overlaying pure web-tech-based rendering elements of chosen flavor, that subscribes to channels of events and data? I.E Angular+RxJS or *MQ-channels?
Omnipotent Intergalactic Entity :: Fabriken AGI <> consume :: adapt :: evolve :: expand
🏭🚀✨🎵 } Factorio inspired music videos :: 🎵 Endless Hunger Machine 🤖 :: 🎵 Colors in Zero-G 🦊 :: 🎵 Fuel the Stars ✨
--
TikTok: @fabriken.agi
Post Reply

Return to “Modding interface requests”