m ProbablePrime moved page Slider`1 (Component) to Component:Slider`1: Creating component Namespace |
Added a suggestion note. |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
{{Infobox Component | {{Infobox Component | ||
|Image=Slider`1Component.png | |Image=Slider`1Component.png | ||
Line 9: | Line 8: | ||
<!--T:2--> | <!--T:2--> | ||
The '''Slider''' component is a [[UIX]] element that a [[User|user]] can use to grab and move along a line, returning a value of that slider's position. | |||
{{Note|If you want a 3D slider, use the [[Component:Slider|Slider]] component instead.|suggestion}} | |||
<!--T:3--> | <!--T:3--> | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|BaseColor| | |BaseColor|ColorX|The color for this slider. | ||
|ColorDrivers|ColorDriver| | |ColorDrivers|{{RootFieldType|SyncList`1|[[Type:ColorDriver|ColorDriver]]}}|TypeAdv1=true|Gives extra color control for different color drive targets. | ||
|__legacy_NormalColor| | |__legacy_NormalColor|ColorX|Internal - Legacy normal color. | ||
|__legacy_HighlightColor| | |__legacy_HighlightColor|ColorX|Internal - Legacy highlight color. | ||
|__legacy_PressColor| | |__legacy_PressColor|ColorX|Internal - Legacy press color. | ||
|__legacy_DisabledColor| | |__legacy_DisabledColor|ColorX|Internal - Legacy disabled color. | ||
|__legacy_TintColorMode|ColorMode| | |__legacy_TintColorMode|ColorMode|Internal - Legacy tint color mode. | ||
|__legacy_ColorDrive| | |__legacy_ColorDrive|{{RootFieldType|FieldDrive`1|[[Type:ColorX|ColorX]]}}|TypeAdv7=true|Internal - Legacy color drive. | ||
|IsPressed|Bool| | |IsPressed|Bool|Check if the user is pressing on the slider handle. | ||
|IsHovering|Bool| | |IsHovering|Bool|Check if the user is hovering on the slider handle. | ||
|Value| | |Value|'''T'''|TypeAdv10=true|The position this slider is at (normalized between <code>0</code> and <code>1</code>) | ||
|Min| | |Min|'''T'''|TypeAdv11=true|The minimum value of this slider. | ||
|Max| | |Max|'''T'''|TypeAdv12=true|The maximum value of this slider. | ||
|Integers|Bool| | |Integers|Bool|Changes the way this slider counts along the slider line. Setting to integers makes it step along whole numbers. | ||
|Power|Float| | |Power|Float|Changes the way this slider determines its position. Power represents a shifted curve of values that is heavier at the ends of the slider. | ||
|VibrationThreshold| | |Clamp|Bool|Enforces the min and max values of this slider. | ||
|SlideDirection|Direction| | |VibrationThreshold|'''T'''|TypeAdv16=true|Haptic feedback for this slider. | ||
|AnchorOffset|Float2| | |SlideDirection|'''[[#Direction|Direction]]<T>'''|TypeAdv17=true|The orientation of this slider's direction. | ||
|HandleAnchorMinDrive|Float2| | |AnchorOffset|Float2|The offset for the handle of this slider. | ||
|HandleAnchorMaxDrive|Float2| | |HandleAnchorMinDrive|{{RootFieldType|FieldDrive`1|[[Type:Float2|Float2]]}}|TypeAdv19=true|The min offset for the handle drive. | ||
|HandleAnchorMaxDrive|{{RootFieldType|FieldDrive`1|[[Type:Float2|Float2]]}}|TypeAdv20=true|The man offset for the handle drive. | |||
|FillLineDrive|{{RootFieldType|FieldDrive`1|[[Type:Float2|Float2]]}}|TypeAdv21=true|Fill line for this slider, fills in one side of it. | |||
|RequireLockInToInteract|bool|Checks to see if a user has locked in a press on this slider. | |||
|RequireInitialPress|bool|Check for a initial press from a user. | |||
}} | }} | ||
<!--T:4--> | <!--T:4--> | ||
== | == Usage == | ||
Sliders are very useful for making menus that do not need to be precise on [[UIX]] elements (unless using steps to lock into a value). | |||
<!--T:5--> | <!--T:5--> | ||
== Examples == | == Examples == | ||
=== Videos === | |||
[[User:ProbablePrime|ProbablePrime]] has made a tutorial on sliders for [[UIX]]: | |||
<youtube>kqF4vF_iYPU</youtube> | |||
<!--T:6--> | <!--T:6--> | ||
Line 46: | Line 55: | ||
</translate> | </translate> | ||
[[Category:Generics{{#translation:}}]] | [[Category:Generics{{#translation:}}]] | ||
[[Category:Components{{#translation:}}|Slider`1 | [[Category:Components{{#translation:}}|Slider`1]] | ||
[[Category: | [[Category:Generic Components{{#translation:}}|Slider`1]] | ||
[[Category:Components:UIX:Interaction{{#translation:}}|Slider`1 | [[Category:Components With Nested Enums{{#translation:}}|Slider`1]] | ||
[[Category:Components:UIX:Interaction{{#translation:}}|Slider`1]] |
Latest revision as of 08:40, 28 July 2024
Component image
The Slider component is a UIX element that a user can use to grab and move along a line, returning a value of that slider's position.
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. |
BaseColor
|
ColorX | The color for this slider. |
ColorDrivers
|
list of ColorDriver | Gives extra color control for different color drive targets. |
__legacy_NormalColor
|
ColorX | Internal - Legacy normal color. |
__legacy_HighlightColor
|
ColorX | Internal - Legacy highlight color. |
__legacy_PressColor
|
ColorX | Internal - Legacy press color. |
__legacy_DisabledColor
|
ColorX | Internal - Legacy disabled color. |
__legacy_TintColorMode
|
ColorMode | Internal - Legacy tint color mode. |
__legacy_ColorDrive
|
field drive of ColorX | Internal - Legacy color drive. |
IsPressed
|
Bool | Check if the user is pressing on the slider handle. |
IsHovering
|
Bool | Check if the user is hovering on the slider handle. |
Value
|
T | The position this slider is at (normalized between 0 and 1 )
|
Min
|
T | The minimum value of this slider. |
Max
|
T | The maximum value of this slider. |
Integers
|
Bool | Changes the way this slider counts along the slider line. Setting to integers makes it step along whole numbers. |
Power
|
Float | Changes the way this slider determines its position. Power represents a shifted curve of values that is heavier at the ends of the slider. |
Clamp
|
Bool | Enforces the min and max values of this slider. |
VibrationThreshold
|
T | Haptic feedback for this slider. |
SlideDirection
|
Direction<T> | The orientation of this slider's direction. |
AnchorOffset
|
Float2 | The offset for the handle of this slider. |
HandleAnchorMinDrive
|
field drive of Float2 | The min offset for the handle drive. |
HandleAnchorMaxDrive
|
field drive of Float2 | The man offset for the handle drive. |
FillLineDrive
|
field drive of Float2 | Fill line for this slider, fills in one side of it. |
RequireLockInToInteract
|
bool | Checks to see if a user has locked in a press on this slider. |
RequireInitialPress
|
bool | Check for a initial press from a user. |
Usage
Sliders are very useful for making menus that do not need to be precise on UIX elements (unless using steps to lock into a value).
Examples
Videos
ProbablePrime has made a tutorial on sliders for UIX: