Skip to content

package editor

import "kaiju/editor"

Constants

WorkspaceStateNone

WorkspaceState(iota)

WorkspaceStateStage

WorkspaceStateContent

Types

Editor

struct

type Editor struct {
    // Has unexported fields.
}

Editor is the entry point structure for the entire editor. It acts as the delegate to the various systems and holds the primary members that make up the bulk of the editor identity.

The design goal of the editor is different than that of the engine.Host, as it is not intended to be passed around for access to the system. Instead it will supply interface functions that are needed to the systems that it holds internally.

Editor.BlurInterface

func (ed *Editor) BlurInterface()

FocusInterface is responsible for disabling the input on the various interfaces that are currently presented to the developer. This primarily includes the menu bar, status bar, and whichever workspace is active.

Editor.Build

func (ed *Editor) Build()

Editor.BuildAndRun

func (ed *Editor) BuildAndRun()

Editor.BuildAndRunCurrentStage

func (ed *Editor) BuildAndRunCurrentStage()

Editor.Cache

func (ed *Editor) Cache() *content_database.Cache

Editor.ContentWorkspaceSelected

func (ed *Editor) ContentWorkspaceSelected()

ContentWorkspaceSelected will inform the editor that the developer has changed to the content workspace. This is an exposed function to meet the interface needs of menu_bar.MenuBarHandler.

Editor.CreateNewCamera

func (ed *Editor) CreateNewCamera()

Editor.CreateNewStage

func (ed *Editor) CreateNewStage()

Editor.Events

func (ed *Editor) Events() *editor_events.EditorEvents

Editor.FocusInterface

func (ed *Editor) FocusInterface()

FocusInterface is responsible for enabling the input on the various interfaces that are currently presented to the developer. This primarily includes the menu bar, status bar, and whichever workspace is active.

Editor.History

func (ed *Editor) History() *memento.History

Editor.OpenVSCodeProject

func (ed *Editor) OpenVSCodeProject()

OpenVSCodeProject will open Visual Studio Code directly to the project top- level folder. This is an exposed function to meet the interface needs of menu_bar.MenuBarHandler.

Editor.Project

func (ed *Editor) Project() *project.Project

Editor.ProjectFileSystem

func (ed *Editor) ProjectFileSystem() *project_file_system.FileSystem

Editor.SaveCurrentStage

func (ed *Editor) SaveCurrentStage()

SaveCurrentStage will save the currently open stage file. This is an exposed function to meet the interface needs of menu_bar.MenuBarHandler.

Editor.Settings

func (ed *Editor) Settings() *editor_settings.Settings

Editor.StageWorkspaceSelected

func (ed *Editor) StageWorkspaceSelected()

StageWorkspaceSelected will inform the editor that the developer has changed to the stage workspace. This is an exposed function to meet the interface needs of menu_bar.MenuBarHandler.

EditorGame

struct

type EditorGame struct{}

EditorGame satisfies [bootstrap.GameInterface] and will allow the engine to bootstrap the editor (as it would a game).

EditorGame.ContentDatabase

func (EditorGame) ContentDatabase() (assets.Database, error)

EditorGame.Launch

func (EditorGame) Launch(host *engine.Host)

EditorGame.PluginRegistry

func (EditorGame) PluginRegistry() []reflect.Type

WorkspaceState

uint8

type WorkspaceState = uint8