Page 1 of 1

LuaGuiElement.bring_to_front()

Posted: Tue May 12, 2020 8:39 pm
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."

Re: LuaGuiElement.bring_to_front()

Posted: Fri May 15, 2020 9:49 pm
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.

Re: LuaGuiElement.bring_to_front()

Posted: Thu May 28, 2020 2:37 pm
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.

Re: LuaGuiElement.bring_to_front()

Posted: Sat Sep 05, 2020 10:41 am
by 『 』
Please make the mod great again! This is a very nice mod so please revive it!

Re: LuaGuiElement.bring_to_front()

Posted: Sun Jun 20, 2021 5:58 am
by ownlyme
its too late, the stubbornness of rseding made me quit modding and afaik they even still havent fixed this.
sorry

Re: LuaGuiElement.bring_to_front()

Posted: Sun Jun 20, 2021 6:46 am
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.

Re: LuaGuiElement.bring_to_front()

Posted: Mon Jun 21, 2021 3:09 am
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

Re: LuaGuiElement.bring_to_front()

Posted: Mon Jun 21, 2021 5:30 am
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.