Game UI
Safe areas
A safe area is the part of a screen where text and controls are certain to be seen and reached. A television may cut off its outer edge. A phone has a notch or an island at one end and a home indicator along the bottom. In Nox a frame carries its safe area as four numbers, and shows it as tinted bands along its edges while you design.

Title-safe and action-safe#
Television and console screens use two areas, one inside the other.
| Area | How far in | What keeps inside it |
|---|---|---|
| Title-safe | 5% of each side | Text, numbers, button hints, anything the player must read |
| Action-safe | 3.5% of each side | Everything else that matters: icons, bars, the edge of a panel |
For the presets Nox ships, to the nearest pixel:
| Preset | Size | Title-safe: sides, top and bottom | Action-safe |
|---|---|---|---|
| 1080p | 1920 × 1080 | 96, 54 | 67, 38 |
| 1440p | 2560 × 1440 | 128, 72 | 90, 50 |
| 4:3 | 1024 × 768 | 51, 38 | 36, 27 |
Backdrop art runs to the very edge of the frame. Only the interface keeps in.
Phone insets#
A phone held sideways keeps clear the same distance at both ends, because the player may turn it either way, and a strip along the bottom for the home indicator.

| Preset | In pixels | The same in points |
|---|---|---|
| 2532×1170 | 141 at each end, 63 below, 0 above | 47 and 21, at 3 pixels to a point |
| 2796×1290 | 177 at each end, 63 below, 0 above | 59 and 21 |
| iPhone (390 × 844, upright) | 47 above, 34 below | In points already |
| iPad (820 × 1180, upright) | 24 above, 20 below | In points already |
These follow Apple's published figures for those screens. For another device, type its own insets.
Set a safe area#
- Press F and choose a screen in the strip, such as 1080p. The frame is made with its safe area.
- For any other frame, select it and press the plus beside Game UI in the inspector.
- Type Safe T, Safe B, Safe L and Safe R: how far in from the top, bottom, left and right.
- Choose View › Safe Areas to show or hide the bands. The Safe areas chip at the right of the frame tool's strip does the same.

The four fields set the frame's first area. On a television preset that is the title-safe one. The bands are guides: they are never drawn in an export.
Name the screen and the convention. The property is safe_area: top, right, bottom, left. Four more numbers may follow for a second, wider area shown with the first.
Give the HUD frame a television's safe areas: title-safe 5% in, action-safe 3.5% in.
The agent calls update_nodes with:
{
"changes": [
{ "id": "3:2", "safe_area": [54, 96, 54, 96, 38, 67, 38, 67] }
]
}
For a phone held sideways, one area is enough: "safe_area": [0, 141, 63, 141]. null takes it away.
The order differs between the two places. The inspector reads T, B, then L, R. The safe_area property reads top, right, bottom, left, clockwise from the top.
Layouts that keep inside#
The bands show the limit. Keeping to it is the layout's job. Three habits make it hold.
Place each cluster on the inset. On a 1080p frame, the top-left cluster starts at x 96, y 54. The top-right cluster ends at x 1824, which is 1920 less 96. The bottom row ends at y 1026, which is 1080 less 54.
Pin each cluster to its own corner. A cluster pinned Right and Top keeps its 96 and 54 when the frame becomes wider or taller. Select the cluster and set Pins in the inspector: H to Left, Right, Left and right, Center or Scale, and V to Top, Bottom, Top and bottom, Center or Scale.
Give text the tighter area. Hold text and numbers to the title-safe area, and let a decorative frame around them reach into the action-safe band.
Through the tools the pin is one property. This call to update_nodes holds a counter to the top right:
{
"changes": [
{ "id": "3:14", "pin": { "horizontal": "right", "vertical": "top" } }
]
}
Pins keep a distance, not a percentage. A cluster 96 from the side of a 1920 frame is still 96 from the side at 2560 wide, where the title-safe inset is 128. When you make the frame a different size class, set its safe_area for that size and move the clusters onto the new inset.
Before you call it done#
- Show the bands and look at each corner. Nothing the player reads should sit on a band.
- Ask an agent to measure.
inspectreturnsin_parent: how far a node is from each edge of its frame, in numbers you can hold against the inset. - Preview the frame at another size without changing it. An agent calls
render_previewwith awidthandheight, and the frame is drawn as its pins would lay it out. - On a phone, check both ends. The notch may be at either.