SlotProps beta
Interface of @v12-engine/client/hud
export interface SlotPropsWhat a Slot is given
Members
active
active?: boolean;Whether it waits for its target: lit as the command being given
autocast
autocast?: boolean;Whether it is cast by itself when it can be: marked as such
charged
charged?: boolean;Whether it holds charges to use: marked as such
class
class?: string;CSS classes added to the slot's element
cooldown
cooldown?: number;Part of its cooldown still to go, 0..1, and the seconds that is, written over it
corner
corner?: {
value: number | string;
tone?: 'mana' | 'count' | 'gold';
};A number at its bottom right: what it costs in mana (blue), charges (white)
disabled
disabled?: boolean;States: cannot be used now, waits for its target, used by itself, always on, charged, sent and waiting
glyph
glyph?: string;Its drawn picture where it has no icon (see Glyph): the command's id
hotkey
hotkey?: string;The key that presses it, in its top left corner
icon
icon?: string;Its picture, an address
ink
ink?: string;The colour of its drawn picture: a command's own
label
label?: string;Words in it where it has no picture at all, in place of the letter: the command's label
learnable
learnable?: boolean;A point can go into it: a "+" over it, which onLearn hears
level
level?: number;How far it is learned: pips under it
maxLevel
maxLevel?: number;The highest level it can be learned to: the number of pips under it
name
name: string;What it is, by name: in its tooltip, and drawn as its first letter where it has no picture
onAlt
onAlt?: (event: MouseEvent) => void;A right-click
onHover
onHover?: (over: boolean) => void;The pointer came onto it, or left it
onLearn
onLearn?: () => void;Told when the "+" is pressed, to put a point into it
onPress
onPress?: (event: MouseEvent) => void;A click (with Shift: queued)
passive
passive?: boolean;Whether it is always on and cannot be pressed: marked as such
pending
pending?: boolean;Whether it was sent and waits to be done: marked as such
seconds
seconds?: number;The seconds of the cooldown still to go, written over the slot
size
size?: SlotSize;How big it is: md when left out
tint
tint?: string;The colour of its face, under its picture: a command's own (--vg-tint), dark gold when left out
tip
tip?: TipContent;Its tooltip: words, or what builds it as it shows
tipOptions
tipOptions?: TipOptions;How its tooltip is shown, such as where it goes (TipOptions)
unlearned
unlearned?: boolean;Not learned yet: greyed