Skip to content

five-on-it / apps/client/src/gui/game-ui / GameUi

Interface: GameUi ​

Defined in: apps/client/src/gui/game-ui.ts:105

The in-game UI.

Methods ​

carTag() ​

carTag(kind, anchor): void

Defined in: apps/client/src/gui/game-ui.ts:109

The tag over a car (anchor gives the point over its roof every frame), or none.

Parameters ​

kind ​

CarTagKind | undefined

anchor ​

() => WorldPoint | undefined

Returns ​

void


claims() ​

claims(event): boolean

Defined in: apps/client/src/gui/game-ui.ts:146

Whether a key press went to a field of the UI rather than to the game.

Parameters ​

event ​

KeyboardEvent

Returns ​

boolean


covers() ​

covers(x, y): boolean

Defined in: apps/client/src/gui/game-ui.ts:144

Whether a point of the canvas (CSS px) is on a panel that takes the mouse.

Parameters ​

x ​

number

y ​

number

Returns ​

boolean


debug() ​

debug(): GuiDebug

Defined in: apps/client/src/gui/game-ui.ts:150

What the tests read.

Returns ​

GuiDebug


dispose() ​

dispose(): void

Defined in: apps/client/src/gui/game-ui.ts:152

Removes it from the scene.

Returns ​

void


garage() ​

garage(view): void

Defined in: apps/client/src/gui/game-ui.ts:124

A garage's panel at the wheel of a car standing in its bay, or none.

Parameters ​

view ​

GarageView | undefined

Returns ​

void


items() ​

items(inventory, container, cash): void

Defined in: apps/client/src/gui/game-ui.ts:118

The inventory strip and the open container's or shop's panel.

Parameters ​

inventory ​

InventoryView | undefined

container ​

ContainerView | undefined

cash ​

number

Returns ​

void


mission() ​

mission(mission, notices, cash, bank?): void

Defined in: apps/client/src/gui/game-ui.ts:111

The mission panel and a race's readout.

Parameters ​

mission ​

{ chase?: { distance: number; }; checkpoint?: boolean; completed: number; escort?: { following: boolean; health: number; }; group?: { done: number; need: number; }; hand?: object[]; helpline?: string; hold?: { distance?: number; left: number; total: number; }; members?: object[]; mission?: string; objective?: { count: number; id: string; index: number; text: string; verb: string; }; party?: object[]; photo?: { x: number; z: number; }; race?: { gate: number; gates: number; lap: number; laps: number; position: number; racers: number; startsIn?: number; }; reason?: string; status: "none" | "failed" | "complete" | "active"; target?: { polygon?: object[]; radius: number; x: number; y?: number; z: number; }; targets?: object[]; timeLeft?: number; title?: string; total: number; type: "mission"; wallet: { cash: number; rep: number; }; winner?: string; } | undefined

notices ​

readonly ShownNotice[]

cash ​

number | undefined

bank? ​

number

Returns ​

void


phone() ​

phone(phone, ui, radio?, jobs?, scanner?, police?, tech?, cops?): void

Defined in: apps/client/src/gui/game-ui.ts:131

The phone as the server says it and the player holds it; the radio, for its Radio page (and what plays, said on it); the Jobs app's view, in the city; the police scanner's page, when the player carries one; the negotiator's call, while one is on; the player's own tech, for the Tech page; the cops' frame, for the Dispatch and Bounties pages.

Parameters ​

phone ​

{ apps: object[]; calls: object[]; camera?: { note?: "subject" | "missed" | "away" | "saved"; shots: number; }; contacts: object[]; has: boolean; messages: object[]; screen?: { app: string; buttons: object[]; form: object[]; kind: "app" | "keypad"; name: string; note?: string; noteKey?: "wrongCode" | "nothing"; source: "phone" | "world"; text: string; title?: string; }; talk?: { choices: object[]; dialogue: string; goesOn: boolean; line?: string; note?: string; speaker?: string; state: "ringing" | "talking"; via: "call" | "face"; with: string; }; type: "phone"; unread: number; waypoint?: { label?: string; x: number; z: number; }; } | undefined

ui ​

PhoneUi

radio? ​

PhoneRadio & object

jobs? ​

JobsView

scanner? ​

ScannerView

police? ​

PoliceCallView

tech? ​
backdoor ​

boolean = ...

battery ​

number = ...

cruiser ​

number = ...

fried ​

boolean = ...

hacking ​

number = ...

jammer ​

boolean = ...

jamming ​

boolean = ...

lawyer ​

number = ...

loop ​

number = ...

scout ​

number = ...

smoked ​

boolean = ...

tipped ​

boolean = ...

traffic ​

number = ...

cops? ​
bounties ​

{ list: object[]; on: boolean; } = ...

Whether their bounty board is on, and the room's bounties when it is.

bounties.list ​

object[] = ...

bounties.on ​

boolean = ...

cop? ​

{ budget: number; costs: number[]; cuff?: { client: number; progress: number; }; dispatcher: boolean; last?: { answer: "rate" | "cooldown" | "failed" | "budget" | "ok" | "notCop" | "dispatcherOnly" | "noSuspect" | "noRoad" | "noBuilding" | "room"; n: number; order: "swat" | "roadblock" | "drone" | "cruiser"; }; max: number; ready: number[]; suspects: object[]; units: object[]; } = ...

Their dispatch, when they play the police.

cop.budget ​

number = count

The team's budget now and at most (points).

cop.costs ​

number[] = ...

What each order costs (points), in COP_ORDERS' order.

cop.cuff? ​

{ client: number; progress: number; } = ...

The cuffs under way: the robber's client id and how far along (0 to 1).

cop.cuff.client ​

number = ...

cop.cuff.progress ​

number = ...

cop.dispatcher ​

boolean = ...

Whether they took the Dispatcher's role (P2: orders at a point of the map).

cop.last? ​

{ answer: "rate" | "cooldown" | "failed" | "budget" | "ok" | "notCop" | "dispatcherOnly" | "noSuspect" | "noRoad" | "noBuilding" | "room"; n: number; order: "swat" | "roadblock" | "drone" | "cruiser"; } = ...

The answer to the cop's last order, and its number (one more each order).

cop.last.answer ​

"rate" | "cooldown" | "failed" | "budget" | "ok" | "notCop" | "dispatcherOnly" | "noSuspect" | "noRoad" | "noBuilding" | "room" = ...

cop.last.n ​

number = count

cop.last.order ​

"swat" | "roadblock" | "drone" | "cruiser" = ...

cop.max ​

number = count

cop.ready ​

number[] = ...

The seconds before each order is the team's again, in COP_ORDERS' order.

cop.suspects ​

object[] = ...

The robbers the police know of: where they last placed them (m), their stars, how long ago (s).

cop.units ​

object[] = ...

The backup the team called that is still out: what, where (m), its seconds left.

transports ​

object[] = ...

The transports they ride or could stop.

type ​

"cops" = ...

Returns ​

void


prompt() ​

prompt(prompt, anchor): void

Defined in: apps/client/src/gui/game-ui.ts:107

The prompt over the character (anchor gives its feet every frame), or none.

Parameters ​

prompt ​

PromptState | undefined

anchor ​

() => WorldPoint | undefined

Returns ​

void


radioWheel() ​

radioWheel(view): void

Defined in: apps/client/src/gui/game-ui.ts:142

The radio wheel while its key is held, or none.

Parameters ​

view ​

WheelView | undefined

Returns ​

void


restyle() ​

restyle(): void

Defined in: apps/client/src/gui/game-ui.ts:148

Lays everything out again (the minimap's size changed).

Returns ​

void