Signal1
Signal support.
EditorResourcePicker.swift:359class Signal1
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 (12) members.
Types
class Signal2
Signal support.
Type members
Instance members
var baseType: String
The base type of allowed resource types. Can be a comma-separated list of several options.
var editable: Bool
If
true
, the value can be selected and edited.var editedResource: Resource?
The edited resource value.
var resourceChanged: Signal2
Emitted when the value of the edited resource was changed.
var resourceSelected: Signal1
Emitted when the resource value was set and user clicked to edit it. When
inspect
istrue
, the signal was caused by the context menu “Edit” or “Inspect” option.var toggleMode: Bool
If
true
, the main button with the resource preview works in the toggle mode. UsesetTogglePressed(_:)
to manually set the state.func getAllowedTypes(
) -> PackedStringArray Returns a list of all allowed types and subtypes corresponding to the
baseType
. If thebaseType
is empty, an empty list is returned.func setTogglePressed(Bool
) Sets the toggle mode state for the main button. Works only if
toggleMode
is set totrue
.
Show implementation details (2)
Hide implementation details
func _handleMenuSelected(id: Int32
) -> Bool This virtual method can be implemented to handle context menu items not handled by default. See
_setCreateOptions(menuNode:)
.
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 (_ resource: Resource, _ inspect: 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:_:)