GameToolDef beta
Interface of @v12-engine/editor
export interface GameToolDefA tool of a game's own, next to the editor's (EditorScene.tools): lanes for a MOBA, the spawn of a wave. Made once with the editor, and handed the pointer and the keys while it is picked. It changes the map through host.editor only, so that what it does undoes like the rest
Members
actions
actions?: ActionDef<EditorClient>[];Keys of its own: actions that count while it is picked, asked before the editor's (so it can take any key then), listed with the editor's keys under the heading each says (group) and the user's to move. run is handed the editor
hint
hint?: string;A line more for the pointer resting on its button
icon
icon?: string;Its icon on the strip of tools, by name in the editor's table of icons (EditorOptions.icons). A wrench when left out
id
id: string;The tool's id, unique among the game's tools
key
key?: BindingLike;The key that picks it, by its place on the keyboard ('KeyO', or 'O', 'Shift+R'): on its icon's tooltip and in the list of every key, where the one who uses the editor can put it elsewhere (the action tool.custom.<id>). No key when left out
make
make(host: ToolHost): Tool;Makes the tool once the editor is there, given what the editor is to a tool
name
name: string;What its button says, and a line more for the pointer resting on it
options
options?: ToolOptionDef[];What it can be set to, on the bar over the scene while it is picked: fields as a game's own on a map are (a number, words, a toggle, one of a few, a unit type…), drawn by the editor and kept by it while it is open. The tool reads them (host.tool.optionsOf(id)), code sets them (editor.tool.setOption)
panel
panel?: Own<{
client: EditorClient;
}>;A piece of the game's own on that bar, after its options: a component, or an element it draws into (mount), given the editor