Scripting API

Scripting API

EditorWindowItem

Record in Abyss.Core, from Abyss.Core.

A window a plugin gave the editor: in the Window menu at its path — under the plugin's package's name, the game's own first — opened in a window of its own and drawn as it says; see Schedule.EditorWindow.

public record EditorWindowItem

Constructors

EditorWindowItem

public EditorWindowItem(string Path, Type? Plugin, ComponentId State, Action<EditorUi, World, byte[]> Draw)

A window a plugin gave the editor: in the Window menu at its path — under the plugin's package's name, the game's own first — opened in a window of its own and drawn as it says; see Schedule.EditorWindow.

Parameters

  • Path: Its folders and its name, between slashes: Checks/Level Check.
  • Plugin: The plugin that gave it, or null for none.
  • State: Its state's struct, as a component of the world; none for a window with none.
  • Draw: What it draws, given its state's bytes, which it leaves as the state is after; empty for none.

Properties

Path

public string Path { get; init; }

Its folders and its name, between slashes: Checks/Level Check.

Plugin

public Type? Plugin { get; init; }

The plugin that gave it, or null for none.

State

public ComponentId State { get; init; }

Its state's struct, as a component of the world; none for a window with none.

Draw

public Action<EditorUi, World, byte[]> Draw { get; init; }

What it draws, given its state's bytes, which it leaves as the state is after; empty for none.

Name

public string Name { get; }

What its tab and the menu read: the last part of its path.

Folders

public IReadOnlyList<string> Folders { get; }

The folders it is in, outermost first: the parts of its path before its name.

Key

public string Key { get; }

What it is known by from one start to the next, built again or not: the plugin's full name and its path — what the editor keeps it open by, where it was, and its state.

StateSize

public int StateSize { get; init; }

How many bytes its state is; none for a window with none.