Skip to reading
The GUI Designer

Give a menu a title bar and close button

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

Create a second GUI, ID workshop_menu, Name Workshop Menu. A 640 by 480 window is a useful starting size for this example. Enable its background and border, then add the title controls you want.

1. Select GUI Window and enable Show Title Bar.

2. Set Title Text to Workshop Menu. Choose the title height, background, font and text alignment.

3. Enable Drag GUI From Title Bar at Runtime if the player should move the window.

4. Enable Show Close Button, choose text or image content, and set its location and size.

5. Apply and save, then check the title and close button in a gameplay preview.

Figure 5. Title-bar settings belong to the GUI window. Keep the first content element below the title strip.

Source table from Give a menu a title bar and close button, page 10
PartUseful controls
TitleHeight, background, text, font size/weight, decorations, color, opacity and alignment.
Title iconShow Title Icon, imported image asset, location and size.
Close buttonText or image, location, width/height, text styling and normal/hover/pressed colors.

Prefer imported project images for title and close icons when distributing a game. A file path that only exists on your computer is harder to keep portable. The close control hides this authored GUI; it is not the same as quitting the game.

Page 10 of 57Permalink
Go to page