Skip to content

package editor

import "kaiju/editor"

Constants

WorkspaceStateNone

WorkspaceState(iota)

WorkspaceStateStage

WorkspaceStateContent

WorkspaceStateShading

WorkspaceStateVfx

WorkspaceStateUI

WorkspaceStateSettings

Functions

RegisterPlugin

func RegisterPlugin(key string, plugin editor_plugin.EditorPlugin)

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(buildMode project.GameBuildMode)

Editor.BuildAndRun

func (ed *Editor) BuildAndRun(buildMode project.GameBuildMode)

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.CreateHtmlUiFile

func (ed *Editor) CreateHtmlUiFile(name string)

Editor.CreateNewCamera

func (ed *Editor) CreateNewCamera()

Editor.CreateNewEntity

func (ed *Editor) CreateNewEntity()

Editor.CreateNewLight

func (ed *Editor) CreateNewLight()

Editor.CreateNewStage

func (ed *Editor) CreateNewStage()

Editor.CreatePluginProject

func (ed *Editor) CreatePluginProject(path string)

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.Host

func (ed *Editor) Host() *engine.Host

Editor.OpenCodeEditor

func (ed *Editor) OpenCodeEditor()

OpenCodeEditor will run a command specified in CodeEditor settings entry directly to the project top level folder. This is an exposed function to meet the interface needs of menu_bar.MenuBarHandler. func (ed *Editor) OpenVSCodeProject() {

Editor.OpenStageInStageWorkspace

func (ed *Editor) OpenStageInStageWorkspace(id string)

Editor.Project

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

Editor.ProjectFileSystem

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

Editor.RecompileWithPlugins

func (ed *Editor) RecompileWithPlugins(plugins []editor_plugin.PluginInfo, onComplete func(err error)) error

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.SaveCurrentStageWithCallback

func (ed *Editor) SaveCurrentStageWithCallback(cb func(bool))

Editor.Settings

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

Editor.SettingsWorkspaceSelected

func (ed *Editor) SettingsWorkspaceSelected()

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

Editor.ShadingWorkspace

func (ed *Editor) ShadingWorkspace() *shading_workspace.ShadingWorkspace

Editor.ShadingWorkspaceSelected

func (ed *Editor) ShadingWorkspaceSelected()

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

Editor.ShowReferences

func (ed *Editor) ShowReferences(id string)

Editor.StageView

func (ed *Editor) StageView() *editor_stage_view.StageView

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.

Editor.UIWorkspaceSelected

func (ed *Editor) UIWorkspaceSelected()

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

Editor.UpdateSettings

func (ed *Editor) UpdateSettings()

Editor.VfxWorkspace

func (ed *Editor) VfxWorkspace() *vfx_workspace.VfxWorkspace

Editor.VfxWorkspaceSelected

func (ed *Editor) VfxWorkspaceSelected()

Editor.ViewHtmlUi

func (ed *Editor) ViewHtmlUi(id string)

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