|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| 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| 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>.
}}
}}
== Behavior ==
== 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]]
[[Category:ComponentStubs]]
Latest revision as of 15:21, 11 November 2024
Component image
Button Value Action Trigger`1 component as seen in the Scene Inspector
The ButtonValueActionTrigger component receives any Button Event and uses it to trigger a Sync Delegate and sends a value to it.
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