MapPickOptions beta
Interface of @v12-engine/editor
export interface MapPickOptionsWhat 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
cancelled?: () => void;Called when the request stops without a click: Escape, another request, or the panel hidden or closed
cursor
cursor?: 'target' | 'arrow';The pointer's look over the scene: target or arrow
grab
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
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
hint?: string;Words shown in the status line while the request lasts
hover
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
many?: boolean;Whether every click is asked for until the request is stopped; the next click alone when left out
pick
pick: (at: MapPick) => void;Told of each click in the scene while the request lasts