Skip to content

EditorInspector beta ​

Class of @v12-engine/editor

ts
export declare class EditorInspector

The sections of the Inspector a game added, and the editor's own it left out (editor.inspector)

Members ​

constructor ​

ts
constructor(changed?: () => void);

Constructs a new instance of the EditorInspector class

actionsFor ​

ts
actionsFor(selected: EditorSelected): (string | InspectorAction)[];

The buttons for what is selected (addActions): of every kind something is selected of, each once

add ​

ts
add(section: InspectorSectionDef, options?: {
        before?: string;
    }): () => void;

Adds a section: before a part of the editor's or another section (before, or the section's own), or after the game's fields. One with the id of another takes its place, one with the id of a part of the editor's own (INSPECTOR_SECTIONS) is drawn in that part's place. Gives back what takes it out

addActions ​

ts
addActions(kinds: string | readonly string[], actions: readonly (string | InspectorAction)[]): () => void;

Buttons for what is selected of some kinds (object, doodad, camp, region, point, path, light, effect, a game's own kind's id), under the Inspector's own: an action of the editor's or the game's by its name (editor.keys: the button says its name and key), or one of its own (InspectorAction). Gives back what takes them away

before ​

ts
before(part: string): InspectorSectionDef[];

The sections of the game's that go before a part of the editor's own, in the order they are drawn: those that say so, each with those that go before it in turn; and, before the part they go to when they say nothing, the rest

inPlaceOf ​

ts
inPlaceOf(part: string): InspectorSectionDef | undefined;

The section of the game's that stands in for a part of the editor's own, if one does

list ​

ts
list(): readonly InspectorSectionDef[];

The sections of the game's own, in the order they were added

remove ​

ts
remove(id: string): void;

Takes a section of the game's out, or leaves out a part of the editor's own (INSPECTOR_SECTIONS): restore brings that one back

restore ​

ts
restore(id: string): void;

Brings back a part of the editor's own that was left out

shows ​

ts
shows(part: string): boolean;

Whether a part of the editor's own is drawn: not left out, and no section of the game's stands in for it