Requesting command that returns the topmost UI display
The command could be called "GetActiveDisplay"
Requesting command that returns the topmost UI display
The command could be called "GetActiveDisplay"
The command should return the latest/active dialog created with createDialog
allDisplays can't do this because the displays returned are in random order
allDisplays can't do this because the displays returned are in random order
But would the more obvious fix, not be to return them in-order?
Also random order?
You not knowing the order, does not mean its random.
Looking at the code its
Options (+children), UserDialog (+children), Map, ChatChannel, Chat, VoiceChat, extra displays (in reversed order)
How about we just fix that command to show correct order?
Children renders before parent. Additionally each display can have a "message box" which renders after the display itself.
So it should be
But is it about rendering or simulation order.
In simulation, the "last" child of a display, is the only one that gets simulated.
Order is
Wow this is a mess huh?
If we were to implement a command that returns the "Active" display. We anyway have to write the code to check all displays in the correct order.
It would be much simpler to make allDisplays return in that order.
It is not clear what you mean by "topmost".
To me, topmost means the one that renders at the top. Which means render order.
But you called the command "active", which to me means is the one that has input focus, if you press a button, then that display is where it goes to. Which means simulation order.
And also there might be displays over top of the one that has input focus, that get simulated first, but don't actually accept any input.
Having allDisplays return in correct order would work for me. What I meant by topmost was the rendering order and I thought this would be same as input focus. The reason I need the topmost display is so that I can add new controls to it via ctrlCreate so that those controls wont get hidden behind UI elements from other displays