Automated: create new component page |
Add info |
||
Line 3: | Line 3: | ||
|Name=Button Value Action Trigger`1 | |Name=Button Value Action Trigger`1 | ||
}} | }} | ||
The '''ButtonValueActionTrigger''' component receives any [[Button Event]] and uses it to trigger a [[Sync Delegate]] and sends a value to it. | |||
== | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|OnPressed|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<T>}}|TypeAdv0=true| | |OnPressed|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<T>}}|TypeAdv0=true| triggers while sending <code>Value</code> when this component receives a [[Button Event]] of type OnPressed. | ||
|OnPressing|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<T>}}|TypeAdv1=true| | |OnPressing|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<T>}}|TypeAdv1=true| triggers while sending <code>Value</code> when this component receives a [[Button Event]] of type OnPressing. | ||
|OnReleased|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<T>}}|TypeAdv2=true| | |OnReleased|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]<T>}}|TypeAdv2=true| triggers while sending <code>Value</code> when this component receives a [[Button Event]] of type OnReleased. | ||
|Value|'''T'''|TypeAdv3=true| | |Value|'''T'''|TypeAdv3=true| The value to send to any <code>OnPressed</code>, <code>OnPressing</code>, and/or <code>OnReleased</code>. | ||
}} | }} | ||
== | == Usage == | ||
Attach to a slot with a button, or a slot targeted by a [[Component:ButtonRelay]] or related. Then, find a [[Sync Delegate]] to trigger using this component. Lastly, put the sync delegate into any <code>OnPressed</code>, <code>OnPressing</code>, and/or <code>OnReleased</code>; then provide <code>Value</code> | |||
== Examples == | == Examples == | ||
== See Also == | == See Also == | ||
* [[Component:ButtonRelay]] | |||
* [[Button Events]] | |||
* [[Sync Delegates]] <- To learn what they are and how to find them. | |||
[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Value Action Trigger`1]] | [[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Value Action Trigger`1]] | ||
[[Category:Components{{#translation:}}|Button Value Action Trigger`1]] | [[Category:Components{{#translation:}}|Button Value Action Trigger`1]] | ||
[[Category:Generic Components{{#translation:}}|Button Value Action Trigger`1]] | [[Category:Generic Components{{#translation:}}|Button Value Action Trigger`1]] | ||
Latest revision as of 15:21, 11 November 2024
Component image
The ButtonValueActionTrigger component receives any Button Event and uses it to trigger a Sync Delegate and sends a value to it.
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. |
OnPressed
|
Action`1<T> | triggers while sending Value when this component receives a Button Event of type OnPressed.
|
OnPressing
|
Action`1<T> | triggers while sending Value when this component receives a Button Event of type OnPressing.
|
OnReleased
|
Action`1<T> | triggers while sending Value when this component receives a Button Event of type OnReleased.
|
Value
|
T | The value to send to any OnPressed , OnPressing , and/or OnReleased .
|
Usage
Attach to a slot with a button, or a slot targeted by a Component:ButtonRelay or related. Then, find a Sync Delegate to trigger using this component. Lastly, put the sync delegate into any OnPressed
, OnPressing
, and/or OnReleased
; then provide Value
Examples
See Also
- Component:ButtonRelay
- Button Events
- Sync Delegates <- To learn what they are and how to find them.