Component:ButtonEnumShift: Difference between revisions

From Resonite Wiki
Automated: update Categories
This is no longer a stub. Added a description. added a usage description. added field descriptions.
 
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=ButtonEnumShift`1Component.png
|Image=ButtonEnumShift`1Component.png
|Name=Button Enum Shift`1
|Name=Button Enum Shift`1
}}
}}
The '''ButtonEnumShift''' component takes in a target [[Enum]] and the amount to shift by (positive numbers are forward, negative numbers are backwards). When an [[Type:IButton|IButton]] component on the same [[Slot|slot]] is pressed, this component will shift the enum.


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|TargetValue|'''[[Type:IField`1|IField`1]]&lt;E&gt;'''|TypeAdv0=true|
|TargetValue|'''[[Type:IField`1|IField`1]]&lt;E&gt;'''|TypeAdv0=true| The target [[Enum]].
|ShiftDelta|Int|
|ShiftDelta|Int| The amount to shift by.
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
This is used to shift enums by button press.


<!--T:4-->
<!--T:4-->
Line 24: Line 26:
== Related Components ==
== Related Components ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Generics{{#translation:}}]]
[[Category:Generics{{#translation:}}]]
[[Category:Components{{#translation:}}|Button Enum Shift`1]]
[[Category:Components{{#translation:}}|Button Enum Shift`1]]
[[Category:Generic Components{{#translation:}}|Button Enum Shift`1]]
[[Category:Generic Components{{#translation:}}|Button Enum Shift`1]]
[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Enum Shift`1]]
[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Enum Shift`1]]

Latest revision as of 21:35, 11 September 2024

Component image 
Button Enum Shift`1 component as seen in the Scene Inspector


The ButtonEnumShift component takes in a target Enum and the amount to shift by (positive numbers are forward, negative numbers are backwards). When an IButton component on the same slot is pressed, this component will shift the enum.

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`1<E> The target Enum.
ShiftDelta Int The amount to shift by.

Usage

This is used to shift enums by button press.

Examples

Related Components