5. Understand X, Y, size and anchors
An element's X and Y are offsets from its chosen Anchor inside its own GUI. Width and Height are its saved size in design pixels. They do not change when you zoom the editor view.
| Anchor example | Settings for a 1280 by 720 GUI | Result |
|---|---|---|
| top-left | Width 180, Height 48; X 20, Y 18 | The element begins 20 pixels from the left and 18 from the top. |
| top-right | Width 180, Height 48; X -20, Y 18 | Its right edge stays 20 pixels inside the GUI's right edge. |
| center | Width 180, Height 48; X 0, Y 0 | The element is centered in the GUI. |
| bottom-right | Width 180, Height 48; X -20, Y -20 | It sits 20 pixels inside the bottom and right edges. |
1. Select Menu Button in the HUD and open General.
2. Choose top-right for Anchor.
3. Set X to -20, Y to 18, Width to 180 and Height to 48.
4. Check the result on the canvas. Negative offsets here move the element inward from the right or bottom.
Figure 6. The anchored menu button uses an inward X offset. A large positive X with top-right would push it outside the GUI.
Choose the anchor, then enter the offsets for that anchor. These are attachment points, not an automatic stretching layout. Test long text and different window sizes rather than assuming an anchored label will grow to fit.
