Component:ButtonDynamicImpulseTriggerWithValue: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
Added description, added usage description, added links to see also section.
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
|Name=Button Dynamic Impulse Trigger With Value`1
|Name=Button Dynamic Impulse Trigger With Value`1
}}
}}
{{stub}}


== Usage ==
The '''ButtonDynamicImpulseTriggerWithValue''' component sends [[Dynamic Impulses]] to [[ProtoFlux:Dynamic Impulse Receiver With Data|flux node receivers with data]]. This acts like a combination of [[ProtoFlux:Button Events|Button Events]] & [[ProtoFlux:Dynamic Impulse Trigger With Data|Dynamic Impulse Trigger With Data]] [[ProtoFlux]] nodes, but as a component instead.
 
{{Table ComponentFields
{{Table ComponentFields
|Target|Slot|
|Target|Slot| The slot to target with impulses specified by <code>PressedData</code>,<code>PressingData</code>,<code>ReleasedData</code>,<code>HoverEnterData</code>,<code>HoverStayData</code>,<code>HoverLeaveData</code>.
|ExcludeDisabled|Bool|
|ExcludeDisabled|Bool| Whether disabled slots and hierarchies should be affected by the dynamic impulses sent.
|PressedData|{{RootFieldType|(nested)|[[#EventData|EventData]]&lt;T&gt;}}|TypeAdv2=true|
|PressedData|{{RootFieldType|(nested)|[[#EventData|EventData]]&lt;T&gt;}}|TypeAdv2=true| What value and tag type dynamic impulse to send when an [[Type:IButton|IButton]] is pressed on the same slot.
|PressingData|{{RootFieldType|(nested)|[[#EventData|EventData]]&lt;T&gt;}}|TypeAdv3=true|
|PressingData|{{RootFieldType|(nested)|[[#EventData|EventData]]&lt;T&gt;}}|TypeAdv3=true| What value and tag type dynamic impulse to send when an [[Type:IButton|IButton]] is being pressed on the same slot. Fires every update while the button is being pressed.
|ReleasedData|{{RootFieldType|(nested)|[[#EventData|EventData]]&lt;T&gt;}}|TypeAdv4=true|
|ReleasedData|{{RootFieldType|(nested)|[[#EventData|EventData]]&lt;T&gt;}}|TypeAdv4=true| What value and tag type dynamic impulse to send when an [[Type:IButton|IButton]] stops being pressed on the same slot.
|HoverEnterData|{{RootFieldType|(nested)|[[#EventData|EventData]]&lt;T&gt;}}|TypeAdv5=true|
|HoverEnterData|{{RootFieldType|(nested)|[[#EventData|EventData]]&lt;T&gt;}}|TypeAdv5=true| What value and tag type dynamic impulse to send when an [[Type:IButton|IButton]] starts being pointed at on the same slot.
|HoverStayData|{{RootFieldType|(nested)|[[#EventData|EventData]]&lt;T&gt;}}|TypeAdv6=true|
|HoverStayData|{{RootFieldType|(nested)|[[#EventData|EventData]]&lt;T&gt;}}|TypeAdv6=true| What value and tag type dynamic impulse to send when an [[Type:IButton|IButton]] is currently pointed at on the same slot. Fires every update while the button is being hovered over.
|HoverLeaveData|{{RootFieldType|(nested)|[[#EventData|EventData]]&lt;T&gt;}}|TypeAdv7=true|
|HoverLeaveData|{{RootFieldType|(nested)|[[#EventData|EventData]]&lt;T&gt;}}|TypeAdv7=true|What value and tag type dynamic impulse to send when an [[Type:IButton|IButton]] stops being pointed at on the same slot.
}}
 
== EventData ==
{{Table TypeFields
|Tag|String| The Tag of the sent impulse
|Value|'''T'''|TypeAdv1=true|The value to send with the [[Dynamic Impulses|Dynamic Impulse]]
}}
}}


== Behavior ==
== Usage ==
Useful for sending dynamic pulses cleanly instead of using flux.


== Examples ==
== Examples ==
This is useful for making a keyboard by putting this component on each button and then sending the char of the button that pressed it, so all your code can be in one place.


== See Also ==
== See Also ==
* [[ProtoFlux:Dynamic Impulse Trigger With Data]]
* [[ProtoFlux:Dynamic Impulse Receiver With Data]]


[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Dynamic Impulse Trigger With Value`1]]
[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Dynamic Impulse Trigger With Value`1]]
Line 27: Line 38:
[[Category:Generic Components{{#translation:}}|Button Dynamic Impulse Trigger With Value`1]]
[[Category:Generic Components{{#translation:}}|Button Dynamic Impulse Trigger With Value`1]]
[[Category:Components With Nested Types{{#translation:}}|Button Dynamic Impulse Trigger With Value`1]]
[[Category:Components With Nested Types{{#translation:}}|Button Dynamic Impulse Trigger With Value`1]]
[[Category:ComponentStubs]]

Latest revision as of 21:05, 11 September 2024

Component image 
Button Dynamic Impulse Trigger With Value`1 component as seen in the Scene Inspector


The ButtonDynamicImpulseTriggerWithValue component sends Dynamic Impulses to flux node receivers with data. This acts like a combination of Button Events & Dynamic Impulse Trigger With Data ProtoFlux nodes, but as a component instead.

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.
Target Slot The slot to target with impulses specified by PressedData,PressingData,ReleasedData,HoverEnterData,HoverStayData,HoverLeaveData.
ExcludeDisabled Bool Whether disabled slots and hierarchies should be affected by the dynamic impulses sent.
PressedData direct EventData<T> What value and tag type dynamic impulse to send when an IButton is pressed on the same slot.
PressingData direct EventData<T> What value and tag type dynamic impulse to send when an IButton is being pressed on the same slot. Fires every update while the button is being pressed.
ReleasedData direct EventData<T> What value and tag type dynamic impulse to send when an IButton stops being pressed on the same slot.
HoverEnterData direct EventData<T> What value and tag type dynamic impulse to send when an IButton starts being pointed at on the same slot.
HoverStayData direct EventData<T> What value and tag type dynamic impulse to send when an IButton is currently pointed at on the same slot. Fires every update while the button is being hovered over.
HoverLeaveData direct EventData<T> What value and tag type dynamic impulse to send when an IButton stops being pointed at on the same slot.

EventData

Fields
Name Type Description
Tag String The Tag of the sent impulse
Value T The value to send with the Dynamic Impulse


Usage

Useful for sending dynamic pulses cleanly instead of using flux.

Examples

This is useful for making a keyboard by putting this component on each button and then sending the char of the button that pressed it, so all your code can be in one place.

See Also