Skip to reading
Buttons, Labels & Text Boxes

1. Give each control one clear job

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 PDF page
Source table from 1. Give each control one clear job, page 4
ControlIts ordinary jobWorkshop example
LabelShow information the player reads.Good evening, @PlayerName.
ButtonOffer an action the player can choose.Use this name or Check answer.
Text BoxLet the player enter or edit text.A visitor name, a command or a puzzle answer.

A label can display a variable without changing it. A text box can collect a name without automatically saving it. A button can look clickable without having an action. The useful connection is the one you deliberately make between them.

Keep names, IDs and visible words separate#

Source table from 1. Give each control one clear job, page 4
Field or valueExampleWhy it matters
GUI IDregister_panelNames the whole interface.
Element IDname_boxNames one control inside it.
Editor NameName BoxHelps you find that control in the editor.
Displayed textUse this nameThe words the player sees on a button.
Variable IDvisitor_nameThe game value the label or script will use.

Use stable IDs, such as name_box, and readable editor names, such as Visitor Name Entry. Giving the text box the same name as a variable does not bind the two together.

An event can also make a label clickable. That is useful for a small help link or a dialogue line, but use a recognisable Button for a main command so the player can tell it is interactive.

Page 4 of 46Permalink
Go to page