Skip to content

SlotProps beta ​

Interface of @v12-engine/client/hud

ts
export interface SlotProps

What a Slot is given

Members ​

active ​

ts
active?: boolean;

Whether it waits for its target: lit as the command being given

autocast ​

ts
autocast?: boolean;

Whether it is cast by itself when it can be: marked as such

charged ​

ts
charged?: boolean;

Whether it holds charges to use: marked as such

class ​

ts
class?: string;

CSS classes added to the slot's element

cooldown ​

ts
cooldown?: number;

Part of its cooldown still to go, 0..1, and the seconds that is, written over it

corner ​

ts
corner?: {
        value: number | string;
        tone?: 'mana' | 'count' | 'gold';
    };

A number at its bottom right: what it costs in mana (blue), charges (white)

disabled ​

ts
disabled?: boolean;

States: cannot be used now, waits for its target, used by itself, always on, charged, sent and waiting

glyph ​

ts
glyph?: string;

Its drawn picture where it has no icon (see Glyph): the command's id

hotkey ​

ts
hotkey?: string;

The key that presses it, in its top left corner

icon ​

ts
icon?: string;

Its picture, an address

ink ​

ts
ink?: string;

The colour of its drawn picture: a command's own

label ​

ts
label?: string;

Words in it where it has no picture at all, in place of the letter: the command's label

learnable ​

ts
learnable?: boolean;

A point can go into it: a "+" over it, which onLearn hears

level ​

ts
level?: number;

How far it is learned: pips under it

maxLevel ​

ts
maxLevel?: number;

The highest level it can be learned to: the number of pips under it

name ​

ts
name: string;

What it is, by name: in its tooltip, and drawn as its first letter where it has no picture

onAlt ​

ts
onAlt?: (event: MouseEvent) => void;

A right-click

onHover ​

ts
onHover?: (over: boolean) => void;

The pointer came onto it, or left it

onLearn ​

ts
onLearn?: () => void;

Told when the "+" is pressed, to put a point into it

onPress ​

ts
onPress?: (event: MouseEvent) => void;

A click (with Shift: queued)

passive ​

ts
passive?: boolean;

Whether it is always on and cannot be pressed: marked as such

pending ​

ts
pending?: boolean;

Whether it was sent and waits to be done: marked as such

seconds ​

ts
seconds?: number;

The seconds of the cooldown still to go, written over the slot

size ​

ts
size?: SlotSize;

How big it is: md when left out

tint ​

ts
tint?: string;

The colour of its face, under its picture: a command's own (--vg-tint), dark gold when left out

tip ​

ts
tip?: TipContent;

Its tooltip: words, or what builds it as it shows

tipOptions ​

ts
tipOptions?: TipOptions;

How its tooltip is shown, such as where it goes (TipOptions)

unlearned ​

ts
unlearned?: boolean;

Not learned yet: greyed