Skip to reading
The GUI Designer

Control what sits in front

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView illustrations

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.

Source table from Control what sits in front, page 16
CommandEffect
Bring to FrontMoves the selection above the highest existing element Z value.
Bring ForwardAdds one to each selected element's Z value.
Send BackwardSubtracts one from each selected element's Z value.
Send to BackMoves 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.

Page 16 of 57Permalink
Go to page