Skip to content

Native UI Templates

egyptron edited this page Sep 24, 2026 · 1 revision

Native UI Templates

Awake Simple S1 provides pre-engineered native Windows UI dialogs. The engine automatically manages message loops, DPI scaling, control placement, and the native Segoe UI typography.


1. Quick Popup (show popup)

A standard native modal message box with an OK button.

show popup("<Title>", "<Message Body>")

Example:

show popup("Notice", "Game progress has been saved.")

2. Card Template (template "card")

Displays a centered modal dialogue card with a bold header, multiline body text (\n), and a confirmation button.

show window template "card":
   title = "<Window Title>"
   header = "<Bold Header Text>"
   content = "<Content text. Supports \n for new lines>"
   button = "<Button Label>"
finish window;

Example:

show window template "card":
   title = "Town Notice"
   header = "The Blacksmith"
   content = "Iron Ore: 12\nSteel Swords: In Stock\n\nUpgrade your equipment today!"
   button = "Continue"
finish window;

3. Input Template (template "input")

Displays an input dialog with a text field. The entered string is saved into the variable named in into variable.

show window template "input":
   title = "<Window Title>"
   prompt = "<Prompt Question>"
   into variable <variable_name>
finish window;

Example:

show window template "input":
   title = "Identity Registration"
   prompt = "Enter your hero's name:"
   into variable player_name
finish window;

display_success("Welcome to the realm, " + player_name)

4. Choice Template (template "choice")

Presents a branch selection dialog with two buttons. The label of the clicked button is stored as a string into the target variable.

show window template "choice":
   title = "<Window Title>"
   question = "<Question to ask>"
   button1 = "<Option A Label>"
   button2 = "<Option B Label>"
   into variable <variable_name>
finish window;

Example:

show window template "choice":
   title = "Crossroads"
   question = "An abandoned dungeon stands before you. What will you do?"
   button1 = "Enter Dungeon"
   button2 = "Walk Away"
   into variable decision
finish window;

statement(start)
if variable decision == "Enter Dungeon" then
   display_warn("Entering the shadows...")
else
   display("You chose to stay safe.")
statement(end)

Clone this wiki locally