Skip to reading
The GUI Designer

Build a small HUD with known measurements

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

Use the following as a starting arrangement, not a required template. Begin with a transparent 1280 by 720 HUD. These elements use top-left unless another anchor is specified.

Source table from Build a small HUD with known measurements, page 14
ElementTypeX, YWidth, Height
objective_labelLabel20, 18850, 48
menu_buttonButtontop-right: -20, 18180, 48
bottom_panelPanel20, 5801240, 120
look_buttonButton40, 602115, 76
use_buttonButton170, 602115, 76
item_imageImage312, 59980, 80
score_labelLabel420, 615260, 46
point_buttonButton850, 610170, 55

Set the panel's Z Index to 0 and the controls above it to 1. Give the buttons the texts Look, Use, Menu and Add a point. Use Text & Content to set the label text; the dynamic values are connected in Chapter 8.

Figure 9. The lower part of the example HUD during play. The panel supplies the backing; the controls remain separate elements.

Why the panel goes behind the controls#

A panel is useful for a shared background. Ordinary controls are not automatically children of that panel just because they overlap it. Use their own positions, and group them when you want to move the arrangement together.

Keep Preview off while building the layout. If a click operates a control instead of selecting or dragging it, switch back to editing mode.

Page 14 of 57Permalink
Go to page