Skip to content

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`).

Terminal window
% ./plume3d gui_terminal

or

Terminal window
% ./../plume3d .
  • 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.
  • GuibeginWindow, layoutRowDynamic, label, endWindow.
  • Loggerinfo (used inside command handlers).

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.