Difference between revisions of "ButtonValueShift (Component)"
Jump to navigation
Jump to search
(Added 'Related Issues' section.) |
(Added description and usage.) |
||
Line 7: | Line 7: | ||
|Name=Button Value Shift`1 | |Name=Button Value Shift`1 | ||
}} | }} | ||
+ | |||
+ | The ButtonValueShift component can be used to make a button add X to a value whenever it is pressed. | ||
<!--T:2--> | <!--T:2--> | ||
Line 20: | Line 22: | ||
<!--T:3--> | <!--T:3--> | ||
== Usage == | == Usage == | ||
+ | To function, the component simply needs to be attached to a slot that also has a button component attached to it. | ||
+ | From then on, pressing that button will activate the ButtonValueShift, making it shift its <code>TargetValue</code> by its <code>Delta</code>. | ||
<!--T:4--> | <!--T:4--> |
Latest revision as of 09:18, 27 December 2021
This article or section is a Stub. You can help the Neos Wiki by expanding it.
The ButtonValueShift component can be used to make a button add X to a value whenever it is pressed.
Fields
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 |
TargetValue
|
IField<float> | The value to shift. |
Delta
|
Float | By how much TargetValue should be shifted on each press.
|
Min
|
Float | The minimum value that can be shifted to. |
Max
|
Float | The maximum value that can be shifted to. |
WrapAround
|
Bool | Whether or not the value should wrap around to the other extreme when reaching either Min or Max .
|
Usage
To function, the component simply needs to be attached to a slot that also has a button component attached to it.
From then on, pressing that button will activate the ButtonValueShift, making it shift its TargetValue
by its Delta
.
Examples
Related Issues
#2108 - ButtonValueShift "WrapAround" does not wrap around in reverse properly
#2431 - ButtonValueShift<floatQ> is created with invalid values and fails to rotate target
#2441 - ButtonValueShift<floatQ> doesn't rotate target as expected