Component:ComponentSelector: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
add info
Line 3: Line 3:
|Name=Component Selector
|Name=Component Selector
}}
}}
{{stub}}
The '''Component Selector''' is better understood on its page, [[Complex Types in Components]].


== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|ComponentSelected|{{RootFieldType|SyncDelegate`1|[[Type:ComponentSelectionHandler|ComponentSelectionHandler]]}}|TypeAdv0=true|
|ComponentSelected|{{RootFieldType|SyncDelegate`1|[[Type:ComponentSelectionHandler|ComponentSelectionHandler]]}}|TypeAdv0=true| The Sync delegate to call when the component is attached.
|ComponentFilter|{{RootFieldType|SyncDelegate`1|[[Type:Predicate`1|Predicate`1]]<[[Type:Type|Type]]>}}|TypeAdv1=true|
|ComponentFilter|{{RootFieldType|SyncDelegate`1|[[Type:Predicate`1|Predicate`1]]<[[Type:Type|Type]]>}}|TypeAdv1=true| The type of Components to show in the attacher.
|GenericArgumentPrefiller|{{RootFieldType|SyncDelegate`1|[[Type:GenericArgumentPrefiller|GenericArgumentPrefiller]]}}|TypeAdv2=true|
|GenericArgumentPrefiller|{{RootFieldType|SyncDelegate`1|[[Type:GenericArgumentPrefiller|GenericArgumentPrefiller]]}}|TypeAdv2=true| A sync delegate that fills the list of generic arguments for a selected type so it doesn't only ask for a certain type.
|_uiRoot|Slot|
|_uiRoot|Slot| The root slot of the UI.
|_rootPath|String|
|_rootPath|String| The path that this is navigated to in the component attacher.
|_genericType|{{RootFieldType|SyncType}}|TypeAdv5=true|
|_genericType|{{RootFieldType|SyncType}}|TypeAdv5=true| The generic type we are trying to make a generic fill for.
|_customGenericTypeLabel|{{RootFieldType|FieldDrive`1|[[Type:String|String]]}}|TypeAdv6=true|
|_customGenericTypeLabel|{{RootFieldType|FieldDrive`1|[[Type:String|String]]}}|TypeAdv6=true| The label for the generic type we are attaching.
|_customGenericTypeColor|{{RootFieldType|FieldDrive`1|[[Type:ColorX|ColorX]]}}|TypeAdv7=true|
|_customGenericTypeColor|{{RootFieldType|FieldDrive`1|[[Type:ColorX|ColorX]]}}|TypeAdv7=true| The color for the generic type we are attaching.
|_customGenericArguments|{{RootFieldType|SyncRefList`1|[[Component:TextField|TextField]]}}|TypeAdv8=true|
|_customGenericArguments|{{RootFieldType|SyncRefList`1|[[Component:TextField|TextField]]}}|TypeAdv8=true| The generic arguments being used for the current Component being attached. See [[Complex Types in Components]].
}}
 
== Sync Delegates ==
{{Table ComponentTriggers
|OnCancelPressed|[[Type:Delegate|Delegate]]<[[Type:IButton|IButton]] button, [[Type:ButtonEventData|ButtonEventData]] eventData>| Closes the UI and doesn't attach anything.
|OnOpenCategoryPressed|[[Type:Delegate|Delegate]]<[[Type:IButton|IButton]] button, [[Type:ButtonEventData|ButtonEventData]] eventData, [[Type:String|string]] path>| Opens a category of the path argument given.
|OnGenericTypesPressed|[[Type:Delegate|Delegate]]<[[Type:IButton|IButton]] button, [[Type:ButtonEventData|ButtonEventData]] eventData, [[Type:String|string]] pathType>| Builds the UI for a component being clicked that has a generic argument.
|OnGroupPressed|[[Type:Delegate|Delegate]]<[[Type:IButton|IButton]] button, [[Type:ButtonEventData|ButtonEventData]] eventData, [[Type:String|string]] pathWithGroup>| Builds a UI for a component group like Pack3 or Pack2.
|OnAddComponentPressed|[[Type:Delegate|Delegate]]<[[Type:IButton|IButton]] button, [[Type:ButtonEventData|ButtonEventData]] eventData, [[Type:String|string]] typename>| Triggers when a component is addrd.
|OnCreateCustomType|[[Type:Delegate|Delegate]]<[[Type:IButton|IButton]] button, [[Type:ButtonEventData|ButtonEventData]] eventData>| Triggers when a component is made via the attacher with a generic type that isn't in the list of preselected generics.
}}
}}


== Behavior ==
== Usage ==
See [[Complex Types in Components]].


== Examples ==
== Examples ==
See [[Complex Types in Components]].


== See Also ==
== See Also ==
* [[Complex Types in Components]]
* [[Scene Inspector]]


[[Category:Components:Uncategorized{{#translation:}}|Component Selector]]
[[Category:Components:Uncategorized{{#translation:}}|Component Selector]]
[[Category:Components{{#translation:}}|Component Selector]]
[[Category:Components{{#translation:}}|Component Selector]]
[[Category:ComponentStubs]]

Revision as of 19:54, 13 February 2025

Component image 
Component Selector component as seen in the Scene Inspector

The Component Selector is better understood on its page, Complex Types in Components.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.
ComponentSelected delegate of identity ComponentSelectionHandler The Sync delegate to call when the component is attached.
ComponentFilter delegate of identity Predicate`1<Type> The type of Components to show in the attacher.
GenericArgumentPrefiller delegate of identity GenericArgumentPrefiller A sync delegate that fills the list of generic arguments for a selected type so it doesn't only ask for a certain type.
_uiRoot Slot The root slot of the UI.
_rootPath String The path that this is navigated to in the component attacher.
_genericType direct SyncType The generic type we are trying to make a generic fill for.
_customGenericTypeLabel field drive of String The label for the generic type we are attaching.
_customGenericTypeColor field drive of ColorX The color for the generic type we are attaching.
_customGenericArguments list of TextField The generic arguments being used for the current Component being attached. See Complex Types in Components.

Sync Delegates

Lua error in mw.text.lua at line 25: bad argument #1 to 'match' (string expected, got nil).
Triggers
Method Name Method type and Arguments. Is the method hidden? Description

Usage

See Complex Types in Components.

Examples

See Complex Types in Components.

See Also