Component:ButtonActionTrigger: Difference between revisions

From Resonite Wiki
No edit summary
 
Updated this page. Updated descriptions. style. This page is no longer a stub.
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages></languages>
<languages></languages>
<translate>
<translate>
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=ButtonActionTriggerComponent.png
|Image=ButtonActionTriggerComponent.png
|Name=ButtonActionTrigger
|Name=ButtonActionTrigger
}}
}}
== Intoduction ==
The '''ButtonActionTrigger''' component is used for triggering C# [[:Category:Types:Action|actions]] (not to be confused with [[:Category:Types:Impulse|impulses]]) using [[Button (Component)| UIX Buttons]] or [[NeosButton (Component)|Resonite buttons]].


It must be a child of the same slot as a button in order to be bound to it.
The '''ButtonActionTrigger''' component is used for triggering C# [[Type:Action|actions]] (not to be confused with [[Impulses|impulses]]) using the Interface [[Type:IButton|IButton]], such as [[Button (Component)| UIX Buttons]] or [[LegacyButton (Component)|Legacy Buttons]].
== Usage ==
 
This component must be on the same [[Slot|slot]] as the [[Type:IButton|button]] in order to be bound to it.
 
{{Table ComponentFields
{{Table ComponentFields
|OnPressed|Action| Triggered when the button is pressed
|OnPressed|{{RootFieldType|SyncDelegate`1|[[Type:Action|Action]]}}|TypeAdv0=true| Triggered when the button is pressed
|OnPressing|Action| Triggered when the button is pressed, before the <code>OnPressed</code> event
|OnPressing|{{RootFieldType|SyncDelegate`1|[[Type:Action|Action]]}}|TypeAdv1=true| Triggered when the button is pressed, before the <code>OnPressed</code> event
|OnReleased|Action| Triggered when the button is released
|OnReleased|{{RootFieldType|SyncDelegate`1|[[Type:Action|Action]]}}|TypeAdv2=true| Triggered when the button is released
}}
}}
== Behavior ==
 
This component allows you to trigger [[:Category:Types:Action|actions]] on some special components, such as the [[RandomObjectSpawner (Component)| Random Object Spawner component]], by dragging the reference to the target action into a trigger slot (such as <code>OnPressed</code>)
== Usage ==
This component allows you to trigger [[Type:Action|actions]] on some special components, such as the [[RandomObjectSpawner (Component)| Random Object Spawner component]], by dragging the reference to the target action into a trigger slot (such as <code>OnPressed</code>).
 
== Examples ==
== Examples ==
== Related Components ==
== Related Components ==
</translate>
</translate>
[[Category:Components{{#translation:}}|ButtonActionTrigger (Component){{#translation:}}]]
[[Category:Components{{#translation:}}|Button Action Trigger]]
[[Category:Components:Common UI:Button Interactions{{#translation:}}|ButtonActionTrigger (Component){{#translation:}}]]
[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Action Trigger]]
[[Category:Triggers]]
[[Category:Triggers]]

Latest revision as of 20:14, 11 September 2024

Component image 
ButtonActionTrigger component as seen in the Scene Inspector


The ButtonActionTrigger component is used for triggering C# actions (not to be confused with impulses) using the Interface IButton, such as UIX Buttons or Legacy Buttons.

This component must be on the same slot as the button in order to be bound 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 Triggered when the button is pressed
OnPressing Action Triggered when the button is pressed, before the OnPressed event
OnReleased Action Triggered when the button is released

Usage

This component allows you to trigger actions on some special components, such as the Random Object Spawner component, by dragging the reference to the target action into a trigger slot (such as OnPressed).

Examples

Related Components