components/game-hud
Type Aliases
Section titled “Type Aliases”GameAccent
Section titled “GameAccent”GameAccent =
"moss"|"ember"|"tide"
The accent a game tints the shared game theme with.
GameThemeProps
Section titled “GameThemeProps”GameThemeProps =
Readonly<{data-theme:"field-guide"|"field-guide-night";data-game-accent:GameAccent; }>
Theme attributes for any element that hosts game HUD pieces.
GameRegionName
Section titled “GameRegionName”GameRegionName =
"top-left"|"top-right"|"right"|"bottom"|"bottom-left"|"center"
A region of the game layer, laid over a full-bleed world.
HudTone
Section titled “HudTone”HudTone =
"success"|"warning"|"error"|"info"
Semantic bar tones; the theme supplies each colour.
HudBarProps
Section titled “HudBarProps”HudBarProps =
Omit<HTMLAttributes<HTMLDivElement>>,"children"> > &object
Props accepted by HudBar.
Type Declaration
Section titled “Type Declaration”label:
string
value:
number
max:
number
optionaltone?:HudTone
glyph?
Section titled “glyph?”
optionalglyph?:ReactNode
HudPhase
Section titled “HudPhase”HudPhase =
"day"|"dusk"|"night"|"dawn"
The light of the day a clock shows.
PortraitMood
Section titled “PortraitMood”PortraitMood =
"ok"|"warn"|"bad"
How a portrait’s subject is doing.
MinimapMarkKind
Section titled “MinimapMarkKind”MinimapMarkKind =
"self"|"ally"|"foe"|"place"|"goal"
What a minimap mark stands for; the theme colours each kind.
MinimapMark
Section titled “MinimapMark”MinimapMark =
Readonly<{x:number;y:number;kind:MinimapMarkKind;label:string; }>
One mark on the minimap, in whole grid cells.
GameCardKind
Section titled “GameCardKind”GameCardKind =
"goal"|"letter"|"dialogue"|"end"|"screen"
What a game card is for; each kind sets its size and voice.
RecipePart
Section titled “RecipePart”RecipePart =
Readonly<{label:string;glyph:string;have?:number;need?:number;quantity?:number; }>
One ingredient or product of a recipe.
Variables
Section titled “Variables”GameLayer
Section titled “GameLayer”
constGameLayer:ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> > &RefAttributes<HTMLDivElement>>>>
Positions HUD regions over the world; the world stays interactive between them.
GameRegion
Section titled “GameRegion”
constGameRegion:ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> > &object&RefAttributes<HTMLDivElement>>>>
One named HUD region; only its children take pointer input.
GameScrim
Section titled “GameScrim”
constGameScrim:ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> > &RefAttributes<HTMLDivElement>>>>
A dimmed stage for title, pause and end screens; it centres one card.
HudPlate
Section titled “HudPlate”
constHudPlate:ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> > &object&RefAttributes<HTMLDivElement>>>>
A floating paper plate drawn in the sprites’ ink line.
HudBar
Section titled “HudBar”
constHudBar:ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>>,"children"> > &object&RefAttributes<HTMLDivElement>>>>
A segmented resource bar: health, hunger, noise, hull.
HudChip
Section titled “HudChip”
constHudChip:ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLSpanElement>>,"children"> > &object&RefAttributes<HTMLSpanElement>>>>
A counted thing on the HUD: bandages, crowns, round shot.
HudClock
Section titled “HudClock”
constHudClock:ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>>,"children"> > &object&RefAttributes<HTMLDivElement>>>>
The game clock: a phase mark, a label, an optional countdown and time.
Portrait
Section titled “Portrait”
constPortrait:ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>>,"children"> > &object&RefAttributes<HTMLDivElement>>>>
A person in the portrait strip: their mark, name and what they are doing.
MinimapPlate
Section titled “MinimapPlate”
constMinimapPlate:ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>>,"children"> > &object&RefAttributes<HTMLElement>>>>
A small chart of the world: a paper grid with named marks. Names are laid out so none overlap (layoutMinimapLabels); one with no room hides and shows on hover or focus.
GameCard
Section titled “GameCard”
constGameCard:ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>>,"title"> > &object&RefAttributes<HTMLElement>>>>
A paper card: goals, letters, dialogue, pause and end screens.
HudKeys
Section titled “HudKeys”
constHudKeys:ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> > &object&RefAttributes<HTMLDivElement>>>>
A row of keycaps: a dock across the bottom or a rail down the side.
OfferRow
Section titled “OfferRow”
constOfferRow:ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>>,"children"> > &object&RefAttributes<HTMLDivElement>>>>
A shop or trade line: what, why, how much, and the act of buying it.
RecipeRow
Section titled “RecipeRow”
constRecipeRow:ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>>,"children"> > &object&RefAttributes<HTMLDivElement>>>>
A workbench recipe: inputs (short ones marked) become the output.
Functions
Section titled “Functions”gameThemeProps()
Section titled “gameThemeProps()”gameThemeProps(
accent?,night?):GameThemeProps
The one game theme: field-guide paper, by day or by night.
Parameters
Section titled “Parameters”accent?
Section titled “accent?”GameAccent = "moss"
night?
Section titled “night?”boolean = false
Returns
Section titled “Returns”HudNumber()
Section titled “HudNumber()”HudNumber(
__namedParameters):Element
A readable number in the theme’s numeric font.
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”string | number
"sm" | "md" = "sm"
Returns
Section titled “Returns”Element
GoalLine()
Section titled “GoalLine()”GoalLine(
__namedParameters):Element
A ticked or open line on a goal card.
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”boolean
children
Section titled “children”ReactNode
Returns
Section titled “Returns”Element
MadeWith()
Section titled “MadeWith()”MadeWith(
__namedParameters):Element
The quiet credit line on an end card.
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "children">
Returns
Section titled “Returns”Element