EditorProperty

package
v0.0.0-...-c909628 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package EditorProperty provides methods for working with EditorProperty object instances.

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
	AsEditorProperty() Instance
}

type Implementation

type Implementation = implementation

Implementation implements Interface with empty methods.

type Instance

type Instance [1]gdclass.EditorProperty

A custom control for editing properties that can be added to the [EditorInspector]. It is added via [EditorInspectorPlugin].

See [Interface] for methods that can be overridden by a [Class] that extends it.

%!(EXTRA string=EditorProperty)

var Nil Instance

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

func New

func New() Instance

func (Instance) AddFocusable

func (self Instance) AddFocusable(control [1]gdclass.Control)

If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed.

func (Instance) AsCanvasItem

func (self Instance) AsCanvasItem() CanvasItem.Instance

func (Instance) AsContainer

func (self Instance) AsContainer() Container.Instance

func (Instance) AsControl

func (self Instance) AsControl() Control.Instance

func (Instance) AsEditorProperty

func (self Instance) AsEditorProperty() Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsObject

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

func (Instance) Checkable

func (self Instance) Checkable() bool

func (Instance) Checked

func (self Instance) Checked() bool

func (Instance) Deletable

func (self Instance) Deletable() bool

func (Instance) DrawWarning

func (self Instance) DrawWarning() bool

func (Instance) EmitChanged

func (self Instance) EmitChanged(property string, value any)

If one or several properties have changed, this must be called. [param field] is used in case your editor can modify fields separately (as an example, Vector3.x). The [param changing] argument avoids the editor requesting this property to be refreshed (leave as [code]false[/code] if unsure).

func (Instance) GetEditedObject

func (self Instance) GetEditedObject() Object.Instance

Gets the edited object.

func (Instance) GetEditedProperty

func (self Instance) GetEditedProperty() string

Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin._parse_property]), then this will return the property.

func (Instance) Keying

func (self Instance) Keying() bool

func (Instance) Label

func (self Instance) Label() string

func (Instance) OnMultiplePropertiesChanged

func (self Instance) OnMultiplePropertiesChanged(cb func(properties []string, value []any))

func (Instance) OnObjectIdSelected

func (self Instance) OnObjectIdSelected(cb func(property string, id int))

func (Instance) OnPropertyCanRevertChanged

func (self Instance) OnPropertyCanRevertChanged(cb func(property string, can_revert bool))

func (Instance) OnPropertyChanged

func (self Instance) OnPropertyChanged(cb func(property string, value any, field string, changing bool))

func (Instance) OnPropertyChecked

func (self Instance) OnPropertyChecked(cb func(property string, checked bool))

func (Instance) OnPropertyDeleted

func (self Instance) OnPropertyDeleted(cb func(property string))

func (Instance) OnPropertyKeyed

func (self Instance) OnPropertyKeyed(cb func(property string))

func (Instance) OnPropertyKeyedWithValue

func (self Instance) OnPropertyKeyedWithValue(cb func(property string, value any))

func (Instance) OnPropertyPinned

func (self Instance) OnPropertyPinned(cb func(property string, pinned bool))

func (Instance) OnResourceSelected

func (self Instance) OnResourceSelected(cb func(path string, resource [1]gdclass.Resource))

func (Instance) OnSelected

func (self Instance) OnSelected(cb func(path string, focusable_idx int))

func (Instance) ReadOnly

func (self Instance) ReadOnly() bool

func (Instance) SetBottomEditor

func (self Instance) SetBottomEditor(editor [1]gdclass.Control)

Puts the [param editor] control below the property label. The control must be previously added using [method Node.add_child].

func (Instance) SetCheckable

func (self Instance) SetCheckable(value bool)

func (Instance) SetChecked

func (self Instance) SetChecked(value bool)

func (Instance) SetDeletable

func (self Instance) SetDeletable(value bool)

func (Instance) SetDrawWarning

func (self Instance) SetDrawWarning(value bool)

func (Instance) SetKeying

func (self Instance) SetKeying(value bool)

func (Instance) SetLabel

func (self Instance) SetLabel(value string)

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) UpdateProperty

func (self Instance) UpdateProperty()

Forces refresh of the property display.

func (Instance) Virtual

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

type Interface

type Interface interface {
	//When this virtual function is called, you must update your editor.
	UpdateProperty()
	//Called when the read-only status of the property is changed. It may be used to change custom controls into a read-only or modifiable state.
	SetReadOnly(read_only bool)
}

Jump to

Keyboard shortcuts

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