Variables
Variables hold values that can be read or written. Definition:
let name = valueThis defines name with value value. value can be a Float, a Rect, or an expression that evaluates to one of those.
Variables can be redefined; only the last definition is used. After definition, you can use the variable when creating elements or defining other variables.
Built-in variables
t: current time in secondstop: ratio of actual height to actual widtho: scroll offsetjoined: 1 if the user has joined the event, 0 otherwise$h: maximum scroll height; set this to limit how far the user can scroll
NOTE
UML has no events; use t, o, and button press times to add dynamics (animations, page changes, etc.).
Global variables
Global variables can be read or written anywhere in the UML file. Definition:
global name = @typeHere type can only be btn. You can still assign with let; the last assignment wins.
NOTE
The event UI is redrawn every frame, so all variables are recomputed each frame. Some button properties must persist across frames, so they use global variables.