Table
The hand and the battle HUD. Mounted once on the scene's `Table` anchor, it draws the fan of handbills across the bottom of the screen, Ada's Nerve, her Breath and Block, the tent's Laughter meter, the deck and discard piles, the clown's plate above the ring, and the End Turn and…
Table
The hand and the battle HUD. Mounted once on the scene's Table anchor, it
draws the fan of handbills across the bottom of the screen, Ada's Nerve, her
Breath and Block, the tent's Laughter meter, the deck and discard piles, the
clown's plate above the ring, and the End Turn and Pause targets.
It reads the run through Core.state() and asks for every change through
Core.cmd(...) — it writes nothing the Director owns.
Public fields
inputMap: inputMap ref— the control scheme the table reads (game.input.tableby default):focusCard,play,endTurn,pause.
Controls
| mouse + keyboard | touch | controller | |
|---|---|---|---|
| focus a card | arrows, or hover a card | — | left stick / d-pad |
| play the focused card | Space / Enter, or click a card | tap a card | south |
| end the turn | E, or click END TURN | tap END TURN | north |
| pause | Escape, or click the glyph | tap the glyph | start |
The cards, End Turn and the pause glyph are the touch controls: a tap is resolved against the stack of widgets under the point, so a card is still what a finger landed on when something else is drawn over the table.
What it draws and when
The table is on the glass in battle, pause and reward, and interactive
only in battle. It re-renders when the run changes or while something is
moving, not every frame.
Composition and every size come from game.ui.hud; the card faces come from
game.ui.CardArt.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2game.ui.Table — the hand and the battle HUD of GREASEPAINT. Mounted once on the scene's `Table` anchor. Draws the fan of handbills across the bottom of the screen, Ada's Nerve, her Breath and Block, the tent's Laughter meter and the house's heat, the three piles, the clown's plate above the ring, and the End Turn and Pause targets. It owns `game/input/table.inputMap`, and on a touch screen the cards and those targets ARE the controls. It reads the run through `Core.state()` and asks for every change through `Core.cmd(...)` — it writes nothing the Director owns. focus a card arrows / left stick / hover a card / tap a card play a card Space or Enter / south / click a card / tap the lifted card end the turn E / north / click or tap END TURN look in a pile Tab / west / tap DECK, SPENT or BURNT pause Escape / start / click or tap the glyph Outside `battle` it draws nothing at all, except the pause glyph while the intro beat is playing — a card is up in front of it in every other phase, and a hand ghosting through that card is not a HUD, it is a smear.
claimGeneration( ) → void
isCurrent( ) → boolean
actOnce(key: string, fn: ?) → void
| arg | type | description |
|---|---|---|
| key | string | |
| fn | ? |
anyFx( ) → boolean
flood(hex: string, peak: number, dur: number) → void
| arg | type | description |
|---|---|---|
| hex | string | |
| peak | number | |
| dur | number |
stamp(text: string, tint: string, dur: number) → void
| arg | type | description |
|---|---|---|
| text | string | |
| tint | string | |
| dur | number |
repoint( ) → void
What is under the cursor changed, so the next hover read must look again even from a cursor that has not moved.
isTouch( ) → boolean
Which family the player is using RIGHT NOW. A finger and a mouse both reach the table as a point on the glass, but they mean different things by it: a mouse has been hovering the card it clicks, a finger has not, so a finger gets to read a card before it commits to playing it.
padLabel(button: string, fallback: string) → string
| arg | type | description |
|---|---|---|
| button | string | |
| fallback | string |
focusNow( ) → number
WHICH card is lifted is the Director's answer, not the table's. Every route in here asks for a focus and waits to be told, so the lift the player sees and the index a play is sent for can never drift apart — and a tap on the lifted card is never mistaken for a tap on a different one.
viewModel( ) → void
signature(vm: ?) → string
| arg | type | description |
|---|---|---|
| vm | ? |
buildTree(vm: ?) → void
The composition itself lives in game.ui.hud, which takes a view model and a metrics table and knows nothing about the run. That is what lets the same table be laid out for a screen this one is not — a wide monitor, a phone held either way — and looked at.
| arg | type | description |
|---|---|---|
| vm | ? |
render(force: boolean?) → void
| arg | type | description |
|---|---|---|
| force | boolean? |
isBattle( ) → boolean
closePile( ) → void
openPile(which: string?) → void
| arg | type | description |
|---|---|---|
| which | string? |
stepPile( ) → void
Tab / west walks the three piles and then closes.
moveFocus(delta: number) → void
| arg | type | description |
|---|---|---|
| delta | number |
focusIndex(i: number) → void
| arg | type | description |
|---|---|---|
| i | number |
playFocused( ) → void
playIndex(i: number) → void
| arg | type | description |
|---|---|---|
| i | number |
touchCard(i: number) → void
A finger lands on a card. If the card is not the lifted one, lift it — the point of a card game is reading the card before you spend it, and on a touchscreen there is no hover to read it with. A second tap on the lifted card plays it.
| arg | type | description |
|---|---|---|
| i | number |
endTurnNow( ) → void
pauseNow( ) → void
pointAt(x: number, y: number) → void
A tap or a click somewhere on the glass. The point is resolved against the STACK the UI reports under it rather than against the topmost widget, so a card is still what a finger landed on when something else is lying over the whole table.
| arg | type | description |
|---|---|---|
| x | number | |
| y | number |
subscribeMap(map: ?) → void
Standing the map down drops the handlers with it, so every activation subscribes again. A handler is only ever hooked to the map object the activation that made it returned.
| arg | type | description |
|---|---|---|
| map | ? |
activateMap( ) → void
deactivateMap( ) → void
listen( ) → void
on(name: ?, fn: ?) → void
| arg | type | description |
|---|---|---|
| name | ? | |
| fn | ? |
awake( ) → void
pointerFocus( ) → void
Hovering a card lifts it, the same as walking the focus with the arrows — but only on a frame where the cursor actually moved. A resting cursor cannot have changed which card it is over, and asking anyway is the single most expensive thing this component used to do.
update(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
editorUpdate(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
onCallback(id: string, _data: any) → void
| arg | type | description |
|---|---|---|
| id | string | |
| _data | any |
dropSub(h: ?) → void
| arg | type | description |
|---|---|---|
| h | ? |
onDestroy( ) → void
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.