Skip to reading
Verbs & Mouse Cursors

13. Put a parser input box in the GUI

Edition 0.86.3.4

Create adventure commands, configure cursor artwork and hotspots, and connect mouse, GUI and parser input to the same interactions.

Download PDFView illustrations

The parser settings define recognition. The player also needs somewhere to type.

1. Open the intended game GUI in the GUI Designer.

2. Add a Text Box element.

3. Give it an ID such as parser_input.

4. Keep Multiline off for this command-entry box.

5. In Type Settings, enable Run Text Parser Command When Enter Is Pressed.

6. Optionally enable Clear Single-Line Text When Enter Is Pressed.

7. Enable Return Focus To Text Box After Enter if repeated keyboard entry suits the game.

8. Give it a useful placeholder, such as Try: please examine the timepiece.

9. Save and test it in the running game.

Figure 21. The single-line text box can submit its contents to the parser on Enter. Clear and focus-return behaviour are separate choices.

The placeholder is a prompt, not a submitted command. The player types the actual sentence, then presses Enter.

Page 31 of 44Permalink
Go to page