PlacedTool beta
Class of @v12-engine/editor
export declare class PlacedTool implements ToolPuts things down one by one where it is clicked, picks one with a press on it and moves it with a drag: the lights, the effects, the points and the sounds, each as its PlacedSpec says
Members
constructor
constructor(host: ToolHost, spec: PlacedSpec);Constructs a new instance of the PlacedTool class
busy
get busy(): boolean;Whether a drag of one is going on: the pointer is the tool's until it ends
cancel
cancel(): void;Cancels a drag in the middle: the one dragged goes back to where it was
cursor
readonly cursor = "target";The pointer over the map is a target
escape
escape(): boolean;Lets go of the one picked; true when there was one
key
key(event: KeyboardEvent): boolean;Turns the one picked (or the next one's facing) by [ and ]; true when the key was one of those and took effect
pointerDown
pointerDown(pointer: ToolPointer): void;Picks and starts dragging the one under the press, or puts a new one down at the ground there
pointerMove
pointerMove(pointer: ToolPointer): void;Moves the one dragged with the pointer, once it has moved far enough to count as a drag; the move is one step in the history
pointerUp
pointerUp(): void;Ends the drag: the move is committed to the history if the pointer moved