(One intermediate revision by one other user not shown)
Line 4:
Line 4:
}}
}}
== 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| 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>.
|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| Whether disabled slots and hierarchies should be affected by the dynamic impulses sent.
|ExcludeDisabled|Bool| Whether disabled slots and hierarchies should be affected by the dynamic impulses sent.
|PressedData|{{RootFieldType|(nested)|[[#EventData|EventData]]<T>}}|TypeAdv2=true| What value and tag type dynamic impulse to send when an [[Type:IButton|IButton]] is pressed on the same slot.
|PressedData|{{RootFieldType|(nested)|[[#EventData|ButtonDynamicImpulseTriggerWithValue`1.EventData]]<T>}}|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]]<T>}}|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.
|PressingData|{{RootFieldType|(nested)|[[#EventData|ButtonDynamicImpulseTriggerWithValue`1.EventData]]<T>}}|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]]<T>}}|TypeAdv4=true| What value and tag type dynamic impulse to send when an [[Type:IButton|IButton]] stops being pressed on the same slot.
|ReleasedData|{{RootFieldType|(nested)|[[#EventData|ButtonDynamicImpulseTriggerWithValue`1.EventData]]<T>}}|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]]<T>}}|TypeAdv5=true| What value and tag type dynamic impulse to send when an [[Type:IButton|IButton]] starts being pointed at on the same slot.
|HoverEnterData|{{RootFieldType|(nested)|[[#EventData|ButtonDynamicImpulseTriggerWithValue`1.EventData]]<T>}}|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]]<T>}}|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.
|HoverStayData|{{RootFieldType|(nested)|[[#EventData|ButtonDynamicImpulseTriggerWithValue`1.EventData]]<T>}}|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]]<T>}}|TypeAdv7=true|What value and tag type dynamic impulse to send when an [[Type:IButton|IButton]] stops being pointed at on the same slot.
|HoverLeaveData|{{RootFieldType|(nested)|[[#EventData|ButtonDynamicImpulseTriggerWithValue`1.EventData]]<T>}}|TypeAdv7=true|What value and tag type dynamic impulse to send when an [[Type:IButton|IButton]] stops being pointed at on the same slot.
}}
}}
Line 22:
Line 23:
}}
}}
== Behavior ==
== Usage ==
Useful for sending dynamic pulses cleanly instead of using flux.
== Examples ==
== Examples ==
Line 29:
Line 31:
== 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]]
Latest revision as of 06:01, 17 March 2025
Component image
Button Dynamic Impulse Trigger With Value`1 component as seen in the Scene Inspector
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.
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.
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.