Skip to content

package editor_events

import "kaijuengine.com/editor/editor_events"

Types

EditorEvents

struct

type EditorEvents struct {
    // OnContentAdded sends the id of the content that was renamed
    OnContentRenamed events.EventWithArg[string]

    // OnContentAdded sends list of content ids that have been added
    OnContentAdded events.EventWithArg[[]string]

    // OnContentRemoved sends list of content ids that have been removed
    OnContentRemoved events.EventWithArg[[]string]

    // OnFocusContent is raised when a content should be focused wherever we
    // are in the UI. This was created for the stage right-click context menu
    // to be able to focus content in the content workspace, but it could be
    // used in other ways as needed.
    OnFocusContent events.EventWithArg[string]

    // OnContentChangesSaved is called when content is updated and allows for
    // other parts of the system to update in order to reflect those changes.
    OnContentChangesSaved events.EventWithArg[string]

    // OnContentPreviewGenerated is called whenever a content preview image has
    // been generated. This is primarily used in the background of the editor
    // for updating any content preview images.
    OnContentPreviewGenerated events.EventWithArg[string]

    // OnNewTagAdded is called whenever any content is introduced with new tag
    OnNewTagAdded events.EventWithArg[string]

    // OnTagNoLongerInUse is called whenever a tag is no longer used by any content
    OnTagNoLongerInUse events.EventWithArg[string]

    OnTagRemoved events.EventWithArg[TagEvent]

    OnTagAdded events.EventWithArg[TagEvent]
}

TagEvent

struct

type TagEvent struct {
    Tag              string
    AffectedContents []string
}