EditorMenuEntry beta
Interface of @v12-engine/editor
export interface EditorMenuEntryA line of a menu of the editor's bar
Members
action
action?: string;The action of the editor's it does, by name (editor.keys: one of the editor's own, or the game's): the line says what the action is called and the key it is on now, and does it, unless it says otherwise itself (label, keys, run). The search finds such a line once, as the action
checked
checked?: (client: EditorClient) => boolean;A line that is on or off: shown with a tick while it is on
disabled
disabled?: (client: EditorClient) => boolean;Whether it cannot be done now: shown, dimmed
hidden
hidden?: (client: EditorClient) => boolean;Whether it is left out now: a line for a project, in an editor without one
icon
icon?: string;Its icon, by name in the editor's table of icons
id
id: string;The entry's id, which the action menus.add and menus.remove find it by
items
items?: EditorMenuEntry[] | ((client: EditorClient) => EditorMenuEntry[]);A menu under it, in the place of something it does
keys
keys?: string | ((client: EditorClient) => string);The key that does it too, as it is shown beside it: words, or asked of the editor as the menu is shown. Its action's, when left out
label
label?: string | ((client: EditorClient) => string);What it says: words, or worked out from the editor as the menu is shown ("Undo: raise the ground"). Its action's, when left out
run
run?: (client: EditorClient) => void | Promise<void>;What it does. Its action, when left out
separator
separator?: boolean;A line drawn before it