Skip to content

InspectorSectionDef beta ​

Interface of @v12-engine/editor

ts
export interface InspectorSectionDef extends Own<InspectorSectionProps>

A section of the Inspector of a game's own. With the id of one of the editor's own (INSPECTOR_SECTIONS) it is drawn in that one's place; otherwise where it says (before), or after the game's fields.

Drawn the way it says, the first of: an element of its own (mount), a component, or the lines (rows) and the buttons (actions) it declares under its title

Members ​

actions ​

ts
actions?: string[];

Actions of the editor's or the game's it has a button for each, by name (editor.keys): the button says the action's name and its key

before ​

ts
before?: string;

The part of the editor's own it goes before (INSPECTOR_SECTIONS), or the section of the game's. After the game's fields when left out

id ​

ts
id: string;

The id of the section: an id of the editor's own (INSPECTOR_SECTIONS) draws in its place

rows ​

ts
rows?: (selected: EditorSelected, client: EditorClient) => InspectorRow[];

Lines it says of what is selected, worked out as it is shown: the declared way, with nothing to draw

title ​

ts
title?: string | ((selected: EditorSelected, client: EditorClient) => string);

Its heading: words, or worked out from what is selected

when ​

ts
when?: (selected: EditorSelected, client: EditorClient) => boolean;

Whether it is shown for what is selected. When left out: whenever something is selected. One that says yes with nothing selected is shown then too, over the editor's words on how to begin