Control what sits in front
There are two stacking levels. GUI Z orders whole interfaces. An element's Z Index and the Arrange commands order controls inside its GUI.
Figure 11. Arrange changes the selected elements' Z Index. A background panel should sit behind its text and buttons.
| Command | Effect |
|---|---|
| Bring to Front | Moves the selection above the highest existing element Z value. |
| Bring Forward | Adds one to each selected element's Z value. |
| Send Backward | Subtracts one from each selected element's Z value. |
| Send to Back | Moves the selection below the lowest existing element Z value. |
Use a modest set of values: the background at 0, controls at 1 and a deliberate overlay above those. Raise GUI Z for a separate menu that must appear above the HUD.
Visible and Enabled answer different questions#
Visible controls whether an element is shown. Enabled controls whether it can be operated. A disabled button can remain visible so the player knows the option exists; a hidden button is removed from view.
A high Z value does not put an off-canvas element back inside the GUI. If something is missing, check its anchor, offsets, size and visibility as well as its stacking order.
