Build the picture in layers
A Panel can provide a colored area. A Button adds a caption and a clickable target. An Image supplies artwork. An inventory or save widget builds repeated slots for you.
| Layer | Suggested Z Index | Reason |
|---|---|---|
| Background illustration | 0 | Keep the illustration behind the interface. |
| Large HUD or popup panel | 1 | This supplies the main surface. |
| Page panels or decorative frames | 2 | These sit above the outer cover or panel. |
| Buttons and widgets | 4 | These must remain visible and receive input. |
| Independent labels | 5 | Place captions clearly above their background. |
Give overlapping elements different drawing orders. Do not rely on two elements with the same Z Index being drawn in the order you happen to prefer.
A decorative Image should have no click action. It can then sit behind an interactive area without becoming another button. A transparent color does not itself make a control ignore mouse input.
An element that looks like a child of a Panel is not automatically part of that Panel. A visual stack, a tab relationship and an ordinary drawing order are different things.
