EditorInspector
A control used to edit properties of an object.
EditorInspector.swift:35class EditorInspector
This is the control that implements property editing in the editor’s Settings dialogs, the Inspector dock, etc. To get the EditorInspector
used in the editor’s Inspector dock, use getInspector
.
EditorInspector
will show properties in the same order as the array returned by getPropertyList
.
If a property’s name is path-like (i.e. if it contains forward slashes), EditorInspector
will create nested sections for “directories” along the path. For example, if a property is named highlighting/gdscript/node_path_color
, it will be shown as “Node Path Color” inside the “GDScript” section nested inside the “Highlighting” section.
If a property has PropertyUsageFlags/propertyUsageGroup
usage, it will group subsequent properties whose name starts with the property’s hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. EditorInspector
will create a top-level section for each group. For example, if a property with group usage is named Collide With
and its hint string is collide_with_
, a subsequent collide_with_area
property will be shown as “Area” inside the “Collide With” section. There is also a special case: when the hint string contains the name of a property, that property is grouped too. This is mainly to help grouping properties like font
, font_color
and font_size
(using the hint string font_
).
If a property has PropertyUsageFlags/propertyUsageSubgroup
usage, a subgroup will be created in the same way as a group, and a second-level section will be created for each subgroup.
This object emits the following signals:
Superclasses
class ScrollContainer
A container used to provide scrollbars to a child control when needed.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Types
class Signal1
Signal support.
class Signal2
Signal support.
class Signal3
Signal support.
class Signal4
Signal support.
class Signal5
Signal support.
class Signal6
Signal support.
class Signal7
Signal support.
Type members
Instance members
var editedObjectChanged: SimpleSignal
Emitted when the object being edited by the inspector has changed.
var objectIdSelected: Signal5
Emitted when the Edit button of an
Object
has been pressed in the inspector. This is mainly used in the remote scene tree Inspector.var propertyDeleted: Signal3
Emitted when a property is removed from the inspector.
var propertyEdited: Signal6
Emitted when a property is edited in the inspector.
var propertyKeyed: Signal2
Emitted when a property is keyed in the inspector. Properties can be keyed by clicking the “key” icon next to a property when the Animation panel is toggled.
var propertySelected: Signal1
Emitted when a property is selected in the inspector.
var propertyToggled: Signal7
Emitted when a boolean property is toggled in the inspector.
var resourceSelected: Signal4
Emitted when a resource is selected in the inspector.
var restartRequested: SimpleSignal
Emitted when a property that requires a restart to be applied is edited in the inspector. This is only used in the Project Settings and Editor Settings.
func getEditedObject(
) -> Object? Returns the object currently selected in this inspector.
func getSelectedPath(
) -> String Gets the path of the currently selected property.