Page MenuHomeFeedback Tracker

[Feature request] Z-index for display/dialog controls
New, NormalPublic

Description

Feature should work similarly to Z-index used in CSS programming or like one of the newer command setMarkerDrawPriority. Feature would solve problems with overlaping controls and possibly open new ways what is possible to do with displays/dialogs (like creating minigames for example).

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Operating System Version
22H2
Category
Ingame UI
Additional Information

name in config suggestions:
drawPriority
ZIndex

Command name suggestions:
ctrlSetDrawPriority
ctrlSetZIndex

and to return current value:
ctrlDrawPriority
ctrlZIndex

All controls created by default would have Z-index set to 0. Z-index should be available to all control types. Negative index means draw under other control, positive index means draw above other control.
Using ctrlSetFocus on control with lower Z-index should not render control above one with higher Z-index.

Currently there are some problems with creating controls that overlaps each other.
You can imagine it as button on the background. If background is not set in class ControlsBackground (in case of config) or has not ctrlEnable set to false, uppon clicking on the background control will button control hide under (that is correct behavior).
Despite, that controls should be initialized in config from top to bottom and hence the draw order should be set by that, in rare occasion it happend to me that control that was defined near the top in class ControlsBackground overlapped the rest of the controls defined under it, even those defined in class Controls. I had to fix that in my dialog by calling ctrlSetFocus to some other control and that fixed the draw order as i defined it. Z-index would be handy to have and not just for that, but also to open new possibilities what can be done with displays/dialogs. You can imagine like a card minigame for example where you put each card on the other. For example Mau-Mau.

Thanks for considering this feature.

Event Timeline