Skip to content

EditorRecentMaps beta ​

Class of @v12-engine/editor

ts
export declare class EditorRecentMaps

The maps opened last, for this game (File › Open Recent, the search): each map opened or saved with a file in the project or a place in the browser goes first, the list kept in this browser across sessions, the newest first, RECENT_MOST of them. One opens as File › Open opens it, asked first whether what is not saved may go.

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

Members ​

constructor ​

ts
constructor(host: RecentHost);

Constructs a new instance of the EditorRecentMaps class

clear ​

ts
clear(): void;

Forgets the list, for this game

isOpen ​

ts
isOpen(entry: RecentMap): boolean;

Whether a map of the list is the one open

list ​

ts
list(): RecentMap[];

The maps opened last, the newest first: the one open among them

note ​

ts
note(event: MapFileEvent, name?: string): void;

A map opened or saved (file.opened, file.saved): first in the list. One of neither a file nor a place is not one to open again

open ​

ts
open(entry: RecentMap): Promise<boolean>;

Opens a map of the list, as File › Open does: its file in the project (while there is one), else where the browser keeps it. One that is no longer there is said, and left out of the list. False when it was not opened

openPrevious ​

ts
openPrevious(): Promise<boolean>;

Opens the map opened before the one open (previous). False when there is none, or it was not opened

previous ​

ts
previous(): RecentMap | undefined;

The map opened before the one open: the first of the list that is not it