Documentation
¶
Overview ¶
Package EditorResourcePicker provides methods for working with EditorResourcePicker object instances.
Index ¶
- type Advanced
- type Any
- type Extension
- func (self *Extension[T]) AsBoxContainer() BoxContainer.Instance
- func (self *Extension[T]) AsCanvasItem() CanvasItem.Instance
- func (self *Extension[T]) AsContainer() Container.Instance
- func (self *Extension[T]) AsControl() Control.Instance
- func (self *Extension[T]) AsEditorResourcePicker() Instance
- func (self *Extension[T]) AsHBoxContainer() HBoxContainer.Instance
- func (self *Extension[T]) AsNode() Node.Instance
- func (self *Extension[T]) AsObject() [1]gd.Object
- type ID
- type Implementation
- type Instance
- func (self Instance) AsBoxContainer() BoxContainer.Instance
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsContainer() Container.Instance
- func (self Instance) AsControl() Control.Instance
- func (self Instance) AsEditorResourcePicker() Instance
- func (self Instance) AsHBoxContainer() HBoxContainer.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) BaseType() string
- func (self Instance) Editable() bool
- func (self Instance) EditedResource() Resource.Instance
- func (self Instance) GetAllowedTypes() []string
- func (self Instance) ID() ID
- func (self Instance) OnResourceChanged(cb func(resource Resource.Instance), flags ...Signal.Flags)
- func (self Instance) OnResourceSelected(cb func(resource Resource.Instance, inspect bool), flags ...Signal.Flags)
- func (self Instance) SetBaseType(value string)
- func (self Instance) SetEditable(value bool)
- func (self Instance) SetEditedResource(value Resource.Instance)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetToggleMode(value bool)
- func (self Instance) SetTogglePressed(pressed bool)
- func (self Instance) ToggleMode() bool
- func (self Instance) Virtual(name string) reflect.Value
- type Interface
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 Extension ¶
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]) AsBoxContainer ¶
func (self *Extension[T]) AsBoxContainer() BoxContainer.Instance
func (*Extension[T]) AsCanvasItem ¶
func (self *Extension[T]) AsCanvasItem() CanvasItem.Instance
func (*Extension[T]) AsContainer ¶
func (*Extension[T]) AsEditorResourcePicker ¶
func (*Extension[T]) AsHBoxContainer ¶
func (self *Extension[T]) AsHBoxContainer() HBoxContainer.Instance
type 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.
type Implementation ¶
type Implementation = implementation
Implementation implements Interface with empty methods.
type Instance ¶
type Instance [1]gdclass.EditorResourcePicker
This [Control] node is used in the editor's Inspector dock to allow editing of [Resource] type properties. It provides options for creating, loading, saving and converting resources. Can be used with [EditorInspectorPlugin] to recreate the same behavior. [b]Note:[/b] This [Control] does not include any editor for the resource, as editing is controlled by the Inspector dock itself or sub-Inspectors.
See [Interface] for methods that can be overridden by a [Class] that extends it.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsBoxContainer ¶
func (self Instance) AsBoxContainer() BoxContainer.Instance
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) AsContainer ¶
func (Instance) AsEditorResourcePicker ¶
func (Instance) AsHBoxContainer ¶
func (self Instance) AsHBoxContainer() HBoxContainer.Instance
func (Instance) EditedResource ¶
func (Instance) GetAllowedTypes ¶
Returns a list of all allowed types and subtypes corresponding to the [member base_type]. If the [member base_type] is empty, an empty list is returned.
func (Instance) OnResourceChanged ¶
func (Instance) OnResourceSelected ¶
func (Instance) SetBaseType ¶
func (Instance) SetEditable ¶
func (Instance) SetEditedResource ¶
func (Instance) SetToggleMode ¶
func (Instance) SetTogglePressed ¶
Sets the toggle mode state for the main button. Works only if [member toggle_mode] is set to [code]true[/code].
func (Instance) ToggleMode ¶
type Interface ¶
type Interface interface { //This virtual method is called when updating the context menu of [EditorResourcePicker]. Implement this method to override the "New ..." items with your own options. [param menu_node] is a reference to the [PopupMenu] node. //[b]Note:[/b] Implement [method _handle_menu_selected] to handle these custom items. SetCreateOptions(menu_node Object.Instance) //This virtual method can be implemented to handle context menu items not handled by default. See [method _set_create_options]. HandleMenuSelected(id int) bool }