Skip to content

@maomi/sge / createHud

Function: createHud() ​

createHud(): object

Defined in: src/hud.ts:35

Returns ​

object

root ​

root: HTMLDivElement

banner(text): void

Parameters ​

text ​

string

Returns ​

void

bar() ​

bar(id, __namedParameters): void

Parameters ​

id ​

string

__namedParameters ​

HudBar

Returns ​

void

button() ​

button(id, label, onClick, slotName?): void

Parameters ​

id ​

string

label ​

string

onClick ​

() => void

slotName? ​

"center" | "bottom" | "top" | "top-left" | "above-center" | "below-center" | "rail"

Returns ​

void

dialog() ​

dialog(content): void

Parameters ​

content ​

HudDialog | null

Returns ​

void

dispose() ​

dispose(): void

Returns ​

void

hint() ​

hint(text, slotName?): void

Parameters ​

text ​

string

slotName? ​

"center" | "bottom" | "top" | "top-left" | "above-center" | "below-center" | "rail"

Returns ​

void

mount() ​

mount(slotName, el): void

Parameters ​

slotName ​

"center" | "bottom" | "top" | "top-left" | "above-center" | "below-center" | "rail"

el ​

HTMLElement | null

Returns ​

void

text() ​

text(id, text, slotName?): void

Parameters ​

id ​

string

text ​

string

slotName? ​

"center" | "bottom" | "top" | "top-left" | "above-center" | "below-center" | "rail"

Returns ​

void