gameui — pure zui widget-tree builders for Godzilla in San Francisco.
Every function takes a plain ctx table and returns a tree; no engine calls.
pal(ctx: ?) → void
Palette. Colorblind mode swaps the red/green cues for blue/orange.
label(text: ?, size: ?, color: ?, extra: ?) → void
| arg | type | description |
|---|
| text | ? | |
| size | ? | |
| color | ? | |
| extra | ? | |
menuButton(text: ?, cb: ?, p: ?, opts: ?) → void
| arg | type | description |
|---|
| text | ? | |
| cb | ? | |
| p | ? | |
| opts | ? | |
bar(w: ?, h: ?, frac: ?, fillColor: ?, trackColor: ?, lbl: ?, p: ?) → void
A horizontal meter bar: filled fraction of a fixed-width track.
| arg | type | description |
|---|
| w | ? | |
| h | ? | |
| frac | ? | |
| fillColor | ? | |
| trackColor | ? | |
| lbl | ? | |
| p | ? | |
titleBlock(p: ?, sub: ?) → void
| arg | type | description |
|---|
| p | ? | |
| sub | ? | |
menu(ctx: ?) → void
Main menu. ctx: { settings, best = {score,rank}?, screen = {w,h} }
mapsel(ctx: ?) → void
Map/difficulty select. ctx: { settings, map, difficulty, best = {[map..diff]={score,rank}}, hasSave }
diffBtn(name: ?, id: ?) → void
| arg | type | description |
|---|
| name | ? | |
| id | ? | |
settings(ctx: ?) → void
Settings. ctx: { settings = {master,sfx,music,subtitles,sensitivity,invertY,screenshake,colorblind}, fromPause }
sliderRow(name: ?, id: ?, value: ?, min: ?, max: ?) → void
| arg | type | description |
|---|
| name | ? | |
| id | ? | |
| value | ? | |
| min | ? | |
| max | ? | |
toggleRow(name: ?, id: ?, checked: ?) → void
| arg | type | description |
|---|
| name | ? | |
| id | ? | |
| checked | ? | |
extras(ctx: ?) → void
Extras hub + gallery + scores. ctx: { settings, tab = "gallery"|"scores"|"bio", gallery = {{id,name,score,unlocked,blurb}}, best = {[key]={score,rank}}, total, cosmetics }
tabBtn(name: ?, id: ?, tab: ?) → void
| arg | type | description |
|---|
| name | ? | |
| id | ? | |
| tab | ? | |
custom(ctx: ?) → void
Custom mode. ctx: { settings, custom = { timer, ramp, startRage } }
sliderRow(name: ?, id: ?, value: ?, min: ?, max: ?, fmt: ?) → void
| arg | type | description |
|---|
| name | ? | |
| id | ? | |
| value | ? | |
| min | ? | |
| max | ? | |
| fmt | ? | |
pause(ctx: ?) → void
Pause menu. ctx: { settings }
results(ctx: ?) → void
Results / rank screen. ctx: { settings, r = { survived, score, rank, maxCombo, buildings, units, landmarks = {names}, landmarkBonus, timeAlive, best, newBest, sRankTarget } }
hud(ctx: ?) → void
In-run HUD. ctx: { settings, screen = {w,h}, hp, maxHp, breath, maxBreath, rage, frenzy, frenzyLeft, score, combo, comboLeft, threat, timeLeft, ticker = {strings}, subtitle, charging }
flash(ctx: ?) → void
Full-screen damage flash / frenzy vignette. ctx: { alpha (0..1), color }