LuaGuiElement.bring_to_front()

Post Reply
Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

LuaGuiElement.bring_to_front()

Post by Honktown »

As it is now, it looks like gui elements view-order / layering is dependent on add() order. It'd be nice if when a guielement (stored in screen) is clicked on or dragged, the topmost parent was "brought to front", without changing anything about the children. This could be done manually if a function was exposed, or done automatically. I don't think many people would argue with the logic "you clicked on that gui or something in it, you probably would like to see that gui". If only the click or select events were explicitly watched, then a player could still hit hotkeys for visibility and guielements could update without the view-order changing.

Edit: Hadn't updated to 0.18.23! Need to check it out:

"Clicking a GUI now brings it to the front. Most noticeable when using the map editor or debug GUIs where they overlap."
I have mods! I guess!
Link

User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 232
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: LuaGuiElement.bring_to_front()

Post by Therenas »

I think we need this more than ever now. Meaning the ability to programmatically simulate a user's click on a window. Before, we could rely on the inherent, unchangable ordering of the window to make pop-up windows and such work. Now, we can't be sure which window is in front for the user, so we can't really do that. Would this be possible in a deterministic way?

Might also make sense to have .focus() do this, since it doesn't do anything on frames right now. Doesn't really matter I guess.

Edit: To expand on this after thinking about it some more, I see it this way: There are two things related to this: Knowing the state, and being able to influence it. (State being the layering of the windows) Before the ability to bring windows to the front, we couldn't directly influence the state, but we could infer, ie know, it because we know the order we created them in. Now, we now neither the state, because the user can change it without us knowing, and we can't influence it either.

So, to be able to get it working the way it did before, we either need to be able to read the state of the layering, meaning which window is at the bottom, which is at the top etc, or we need to be able to change it, meaning bringing a window to the front or similar. I would vastly prefer the ability to bring them to the front, but either works, technically.

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: LuaGuiElement.bring_to_front()

Post by ownlyme »

readable and changeable layering order is probably *allegedly* not deterministic, but any method of bringing our frames to the front would be welcome.
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

『 』
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Aug 29, 2020 4:17 pm
Contact:

Re: LuaGuiElement.bring_to_front()

Post by 『 』 »

Please make the mod great again! This is a very nice mod so please revive it!

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: LuaGuiElement.bring_to_front()

Post by ownlyme »

its too late, the stubbornness of rseding made me quit modding and afaik they even still havent fixed this.
sorry
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Re: LuaGuiElement.bring_to_front()

Post by PFQNiet »

ownlyme wrote:
Sun Jun 20, 2021 5:58 am
its too late, the stubbornness of rseding made me quit modding and afaik they even still havent fixed this.
sorry
You claim to have quit but yet here you are coming back nine months later to bitch about something in the "implemented requests" forum saying they "still haven't fixed it"...

You're a real ray of sunshine, you know that?

Find me any game that has as much devotion to the modding community as Factorio does. I'll wait.

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: LuaGuiElement.bring_to_front()

Post by ownlyme »

PFQNiet wrote:
Sun Jun 20, 2021 6:46 am
ownlyme wrote:
Sun Jun 20, 2021 5:58 am
its too late, the stubbornness of rseding made me quit modding and afaik they even still havent fixed this.
sorry
You claim to have quit but yet here you are coming back nine months later to bitch about something in the "implemented requests" forum saying they "still haven't fixed it"...

You're a real ray of sunshine, you know that?

Find me any game that has as much devotion to the modding community as Factorio does. I'll wait.
thanks i didnt notice the subforum this was in.
rseding was like "i dont give a fuck" when he broke the functionality so i didnt expect this to ever get fixed
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Re: LuaGuiElement.bring_to_front()

Post by PFQNiet »

ownlyme wrote:
Mon Jun 21, 2021 3:09 am
thanks i didnt notice the subforum this was in.
rseding was like "i dont give a fuck" when he broke the functionality so i didnt expect this to ever get fixed
Many, many things have gone from "won't ever happen" to "Oh wait..." to "Okay done," sometimes even in the space of one afternoon.

I understand it can be frustrating when something breaks and the devs don't consider it as important as you do, but Wube has got to be the best game dev I have ever seen and they deserve credit for that.

Factorio is a highly-optimised, well-oiled machine, and that comes with some limitations on what can and can't be done, but those limitations will change as the dev team's skill improves.

Post Reply

Return to “Implemented mod requests”