Skip to content

EditorMenuEntry beta ​

Interface of @v12-engine/editor

ts
export interface EditorMenuEntry

A line of a menu of the editor's bar

Members ​

action ​

ts
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 ​

ts
checked?: (client: EditorClient) => boolean;

A line that is on or off: shown with a tick while it is on

disabled ​

ts
disabled?: (client: EditorClient) => boolean;

Whether it cannot be done now: shown, dimmed

hidden ​

ts
hidden?: (client: EditorClient) => boolean;

Whether it is left out now: a line for a project, in an editor without one

icon ​

ts
icon?: string;

Its icon, by name in the editor's table of icons

id ​

ts
id: string;

The entry's id, which the action menus.add and menus.remove find it by

items ​

ts
items?: EditorMenuEntry[] | ((client: EditorClient) => EditorMenuEntry[]);

A menu under it, in the place of something it does

keys ​

ts
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 ​

ts
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 ​

ts
run?: (client: EditorClient) => void | Promise<void>;

What it does. Its action, when left out

separator ​

ts
separator?: boolean;

A line drawn before it