GridMapEditorPlugin

package
v0.0.0-...-ad02d68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2025 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

GridMapEditorPlugin provides access to the [GridMap] editor functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsGridMapEditorPlugin() Instance
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsEditorPlugin

func (self *Extension[T]) AsEditorPlugin() EditorPlugin.Instance

func (*Extension[T]) AsGridMapEditorPlugin

func (self *Extension[T]) AsGridMapEditorPlugin() Instance

func (*Extension[T]) AsNode

func (self *Extension[T]) AsNode() Node.Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.GridMapEditorPlugin

Instance of the class with convieniently typed arguments and results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsEditorPlugin

func (self Instance) AsEditorPlugin() EditorPlugin.Instance

func (Instance) AsGridMapEditorPlugin

func (self Instance) AsGridMapEditorPlugin() Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) ClearSelection

func (self Instance) ClearSelection()

Deselects any currently selected cells.

func (Instance) GetCurrentGridMap

func (self Instance) GetCurrentGridMap() GridMap.Instance

Returns the [GridMap] node currently edited by the grid map editor.

func (Instance) GetSelectedCells

func (self Instance) GetSelectedCells() []any

Returns an array of [Vector3i]s with the selected cells' coordinates.

func (Instance) GetSelectedPaletteItem

func (self Instance) GetSelectedPaletteItem() int

Returns the index of the selected [MeshLibrary] item in the grid map editor's palette or -1 if no item is selected. Note: The indices might not be in the same order as they appear in the editor's interface.

func (Instance) GetSelection

func (self Instance) GetSelection() AABB.PositionSize

Returns the cell coordinate bounds of the current selection. Use Instance.HasSelection to check if there is an active selection.

func (Instance) HasSelection

func (self Instance) HasSelection() bool

Returns true if there are selected cells.

func (Instance) ID

func (self Instance) ID() ID

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetSelectedPaletteItem

func (self Instance) SetSelectedPaletteItem(item int)

Selects the [MeshLibrary] item with the given index in the grid map editor's palette. If a negative index is given, no item will be selected. If a value greater than the last index is given, the last item will be selected. Note: The indices might not be in the same order as they appear in the editor's interface.

func (Instance) SetSelection

func (self Instance) SetSelection(begin Vector3i.XYZ, end Vector3i.XYZ)

Selects the cells inside the given bounds from 'begin' to 'end'.

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL