No edit summary |
Automated: update component fields |
||
Line 13: | Line 13: | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|TargetValue|IField`1| | |TargetValue|'''[[Type:IField`1|IField`1]]<T>'''|TypeAdv0=true| The value to shift. | ||
|Delta| | |Delta|'''T'''|TypeAdv1=true| By how much <code>TargetValue</code> should be shifted on each press. | ||
|Min| | |Min|'''T'''|TypeAdv2=true| The minimum value that can be shifted to. | ||
|Max| | |Max|'''T'''|TypeAdv3=true| 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 <code>Min</code> or <code>Max</code>. | |WrapAround|Bool| Whether or not the value should wrap around to the other extreme when reaching either <code>Min</code> or <code>Max</code>. | ||
|MaxIsExclusive|Bool| | |||
}} | }} | ||
Revision as of 10:39, 1 March 2024
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Component image
The ButtonValueShift component can be used to make a button add X to a value whenever it is pressed.
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`1<T> | The value to shift. |
Delta
|
T | By how much TargetValue should be shifted on each press.
|
Min
|
T | The minimum value that can be shifted to. |
Max
|
T | 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 .
|
MaxIsExclusive
|
Bool |
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
.