Signal6
Signal support.
EditorProperty.swift:1063class Signal6
Use the connect(flags:_:)
method to connect to the signal on the container object, and disconnect(_:)
to drop the connection.
You can also await the emitted
property for waiting for a single emission of the signal.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (37) members.
Types
class Signal1
Signal support.
class Signal10
Signal support.
class Signal11
Signal support.
class Signal2
Signal support.
class Signal3
Signal support.
class Signal4
Signal support.
class Signal5
Signal support.
class Signal7
Signal support.
class Signal8
Signal support.
class Signal9
Signal support.
Type members
Instance members
var checkable: Bool
Used by the inspector, set to
true
when the property is checkable.var checked: Bool
Used by the inspector, set to
true
when the property is checked.var deletable: Bool
Used by the inspector, set to
true
when the property can be deleted by the user.var drawWarning: Bool
Used by the inspector, set to
true
when the property is drawn with the editor theme’s warning color. This is used for editable children’s properties.var keying: Bool
Used by the inspector, set to
true
when the property can add keys for animation.var label: String
Set this property to change the label (if you want to show one).
var multiplePropertiesChanged: Signal2
Emit it if you want multiple properties modified at the same time. Do not use if added via
_parseProperty(object:type:name:hintType:hintString:usageFlags:wide:)
.var objectIdSelected: Signal10
Used by sub-inspectors. Emit it if what was selected was an Object ID.
var propertyCanRevertChanged: Signal8
Emitted when the revertability (i.e., whether it has a non-default value and thus is displayed with a revert icon) of a property has changed.
var propertyChanged: Signal1
Do not emit this manually, use the
emitChanged(property:value:field:changing:)
method instead.var propertyChecked: Signal6
Emitted when a property was checked. Used internally.
var propertyDeleted: Signal4
Emitted when a property was deleted. Used internally.
var propertyKeyed: Signal3
Emit it if you want to add this value as an animation key (check for keying being enabled first).
var propertyKeyedWithValue: Signal5
Emit it if you want to key a property with a single value.
var propertyPinned: Signal7
Emit it if you want to mark (or unmark) the value of a property for being saved regardless of being equal to the default value.
var readOnly: Bool
Used by the inspector, set to
true
when the property is read-only.var resourceSelected: Signal9
If you want a sub-resource to be edited, emit this signal with the resource.
var selected: Signal11
Emitted when selected. Used internally.
func addFocusable(control: 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 emitChanged(property: StringName, value: Variant, field: StringName, changing: Bool
) If one or several properties have changed, this must be called.
field
is used in case your editor can modify fields separately (as an example, Vector3.x). Thechanging
argument avoids the editor requesting this property to be refreshed (leave asfalse
if unsure).func getEditedObject(
) -> Object? Gets the edited object.
func getEditedProperty(
) -> StringName Gets the edited property. If your editor is for a single property (added via
_parseProperty(object:type:name:hintType:hintString:usageFlags:wide:)
), then this will return the property.func setBottomEditor(Control?
) Puts the
editor
control below the property label. The control must be previously added usingNode/addChild(node:forceReadableName:`internal`:)
.func updateProperty(
) Forces refresh of the property display.
Show implementation details (2)
Hide implementation details
func _setReadOnly(Bool
) 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.
func _updateProperty(
) When this virtual function is called, you must update your editor.
Citizens in SwiftGodot
Instance members
var emitted: Void
You can await this property to wait for the signal to be emitted once
func connect(flags: Object.ConnectFlags, @escaping (_ property: StringName, _ checked: Bool) -> ()
) -> Object Connects the signal to the specified callback
func disconnect(Object
) Disconnects a signal that was previously connected, the return value from calling
connect(flags:_:)