Skip to content

MapPickOptions beta ​

Interface of @v12-engine/editor

ts
export interface MapPickOptions

What is asked of the scene (panel.pick, editor.screen.pickFromScene): what to do with the click, and with the pointer as it moves meanwhile (hover, told null as it leaves the scene), whether every click is asked for until it is stopped (many) or the next alone, the pointer's look, words for the status line, and something to do when it stops without a click (Escape, another request, the panel hidden or closed)

Members ​

cancelled ​

ts
cancelled?: () => void;

Called when the request stops without a click: Escape, another request, or the panel hidden or closed

cursor ​

ts
cursor?: 'target' | 'arrow';

The pointer's look over the scene: target or arrow

grab ​

ts
grab?: (at: MapPick) => MapPickDrag | undefined | false;

Asked as the left button goes down in the scene: a drag of something of the panel's there (a key of a path), told where the pointer is as it moves held (move) and as it is let go (drop); nothing, and the press is the picked tool's as if nothing were asked (no pick for it). With it, the pointer's moves are the tool's too unless hover is given. A panel that edits what it draws by dragging asks with many and this

grabs ​

ts
grabs?: (at: MapPick) => boolean;

Whether a press here would be grabbed (grab), asked before it with nothing done: what floats over the scene (the bottom drawer) stays for a press there, as it goes for any other press of the scene's

hint ​

ts
hint?: string;

Words shown in the status line while the request lasts

hover ​

ts
hover?: (at: MapPick | null) => void;

Told where the pointer is as it moves over the scene, and null as it leaves; the picked tool keeps the pointer's moves when left out

many ​

ts
many?: boolean;

Whether every click is asked for until the request is stopped; the next click alone when left out

pick ​

ts
pick: (at: MapPick) => void;

Told of each click in the scene while the request lasts