Skip to content

EditorMapTabs beta ​

Class of @v12-engine/editor

ts
export declare class EditorMapTabs

Several maps open, pinned as tabs: each kept with its history, its file and its files as it was left while another is open, and taken up again as it was (its steps still to undo, its changes still not saved). The open map is pinned (pin), a tab opened (switchTo), or let go of (unpin: the map stays open where it is the one open). Another map opened in a pinned one's place (File › Open) keeps it in its tab.

A part of the editor, as it gives it (editor.tabs)

Members ​

constructor ​

ts
constructor(host: TabsHost);

Constructs a new instance of the EditorMapTabs class

keepsOpen ​

ts
get keepsOpen(): boolean;

Whether the open map is pinned: another opened in its place loses none of it

leaving ​

ts
leaving(): void;

Before another map is opened in the open one's place: a pinned one is kept as it is, for its tab

list ​

ts
get list(): MapTab[];

The maps pinned, in their order

pin ​

ts
pin(): void;

Pins the open map as a tab: what another opened in its place leaves it as, and what a click on it opens again

switchTo ​

ts
switchTo(index: number): EditorResult;

Opens a pinned map in the place of the one open, as it was left. Not while a game is played here, nor on a prefab's stage

unpin ​

ts
unpin(index: number): void;

Lets go of a tab: the map it keeps is gone with it, where it is not the one open