GUI Terminal
App: apps/gui_terminal/
Demonstrates the in-game terminal: press **** (backtick) to open it. Game methods tagged with #!command(description = ”…”)are exposed as terminal commands (e.g.help, hello, reload`).
Run from root
Section titled “Run from root”% ./plume3d gui_terminalor
Run from app directory
Section titled “Run from app directory”% ./../plume3d .What it does
Section titled “What it does”- A small GUI window tells you to press backtick and lists commands: help, hello, reload.
- help — Registered with
#!command(description = "Print help"); prints a short help line. - hello —
#!command(description = "Say hello"); prints “Hello from Wren!”. - reload — Standard command (if available) to reload scripts.
- Gui —
beginWindow,layoutRowDynamic,label,endWindow. - Logger —
info(used inside command handlers).
Defining commands
Section titled “Defining commands”In your Game class, add methods with the #!command attribute:
#!command(description = "Print help")help() { Logger.info("Terminal: help - List commands: help, hello, reload.") }
#!command(description = "Say hello")hello() { Logger.info("Terminal: Hello from Wren!") }The engine collects these via EngineHelper.collectTerminalCommands(Game) and exposes them in the terminal.