Line 16: | Line 16: | ||
{{ScriptFunction|Slider.Direction|Direction|{ get;set; }|The direction of the slider (0 to 4). | {{ScriptFunction|Slider.Direction|Direction|{ get;set; }|The direction of the slider (0 to 4). | ||
0 Left To Right, 1 Right To Left, 2 Bottom To Top, 3 Top To Bottom|5=<pre>Space.Host.ExecutingObject.UISlider.Direction = 1</pre>}} | 0 Left To Right, 1 Right To Left, 2 Bottom To Top, 3 Top To Bottom|5=<pre>Space.Host.ExecutingObject.UISlider.Direction = 1</pre>}} | ||
− | {{ScriptFunction|SColor|DisabledColor|{ get;set | + | |
+ | {{ScriptFunction|SColor|DisabledColor|{get;set}|The color of the control when it is disabled.|5= | ||
+ | local slider=Space.Host.GetReference("Slider").UISlider<br> | ||
+ | Space.Log(slider.DisabledColor.ToString()) | ||
+ | }} | ||
+ | |||
{{ScriptFunction|bool|Enabled|{ get;set; }|Whether this slider is Enabled or not|5=<pre>Space.Host.ExecutingObject.UISlider.Enabled = false --or false</pre>}} | {{ScriptFunction|bool|Enabled|{ get;set; }|Whether this slider is Enabled or not|5=<pre>Space.Host.ExecutingObject.UISlider.Enabled = false --or false</pre>}} | ||
− | {{ScriptFunction|SColor|HighlightedColor|{ get;set | + | |
+ | {{ScriptFunction|SColor|HighlightedColor|{get;set}|The color of the control when it is highlighted.|5= | ||
+ | local slider=Space.Host.GetReference("Slider").UISlider<br> | ||
+ | Space.Log(slider.HighlightedColor.ToString()) | ||
+ | }} | ||
+ | |||
{{ScriptFunction|bool|Interactable|{ get;set;}|Use to enable or disable the ability to interact with the slider.|5=<pre>Space.Host.ExecutingObject.UISlider.Interactable = true</pre>}} | {{ScriptFunction|bool|Interactable|{ get;set;}|Use to enable or disable the ability to interact with the slider.|5=<pre>Space.Host.ExecutingObject.UISlider.Interactable = true</pre>}} | ||
{{ScriptFunction|float|MaxValue|{ get;set; }|The maximum allowed value of the slider.|5=<pre>Space.Host.ExecutingObject.UISlider.MaxValue = 20</pre>}} | {{ScriptFunction|float|MaxValue|{ get;set; }|The maximum allowed value of the slider.|5=<pre>Space.Host.ExecutingObject.UISlider.MaxValue = 20</pre>}} | ||
{{ScriptFunction|float|MinValue|{ get;set; }|The minimum allowed value of the slider.|5=<pre>Space.Host.ExecutingObject.UISlider.MinValue = 10</pre>}} | {{ScriptFunction|float|MinValue|{ get;set; }|The minimum allowed value of the slider.|5=<pre>Space.Host.ExecutingObject.UISlider.MinValue = 10</pre>}} | ||
− | {{ScriptFunction|SColor|NormalColor|{ get;set | + | |
+ | {{ScriptFunction|SColor|NormalColor|{get;set}|The normal color.|5= | ||
+ | local slider=Space.Host.GetReference("Slider").UISlider<br> | ||
+ | Space.Log(slider.NormalColor.ToString()) | ||
+ | }} | ||
{{ScriptFunction|float|NormalizedValue|{ get;set; }|The current value of the slider normalized into a value between 0 and 1.|5=<pre>Space.Log(Space.Host.ExecutingObject.UISlider.NormalizedValue) | {{ScriptFunction|float|NormalizedValue|{ get;set; }|The current value of the slider normalized into a value between 0 and 1.|5=<pre>Space.Log(Space.Host.ExecutingObject.UISlider.NormalizedValue) | ||
--displays the current normalized value of the slider in the console</pre>}} | --displays the current normalized value of the slider in the console</pre>}} | ||
− | {{ScriptFunction|SColor|PressedColor|{ get;set | + | |
+ | {{ScriptFunction|SColor|PressedColor|{get;set}|The color of the control when it is pressed.|5= | ||
+ | local slider=Space.Host.GetReference("Slider").UISlider<br> | ||
+ | Space.Log(slider.PressedColor.ToString()) | ||
+ | }} | ||
+ | |||
{{ScriptFunction|float|Value|{ get;set; }|The current value of the slider.|5=<pre>Space.Log(Space.Host.ExecutingObject.UISlider.Value) | {{ScriptFunction|float|Value|{ get;set; }|The current value of the slider.|5=<pre>Space.Log(Space.Host.ExecutingObject.UISlider.Value) | ||
--displays the current value of the slider in the console</pre>}} | --displays the current value of the slider in the console</pre>}} | ||
{{ScriptFunction|bool|WholeNumbers|{ get;set; }|Should the value only be allowed to be whole numbers?|5=<pre>Space.Host.ExecutingObject.UISlider.WholeNumbers = true --or false</pre>}} | {{ScriptFunction|bool|WholeNumbers|{ get;set; }|Should the value only be allowed to be whole numbers?|5=<pre>Space.Host.ExecutingObject.UISlider.WholeNumbers = true --or false</pre>}} |
Callback executed when the value of the slider is changed.
function valueChanged() Space.Log("value changed") end Space.Host.ExecutingObject.UISlider.OnValueChanged(valueChanged)
This multiplies the tint color for each transition by its value.
The direction of the slider (0 to 4). 0 Left To Right, 1 Right To Left, 2 Bottom To Top, 3 Top To Bottom
Space.Host.ExecutingObject.UISlider.Direction = 1
The color of the control when it is disabled.
Whether this slider is Enabled or not
Space.Host.ExecutingObject.UISlider.Enabled = false --or false
The color of the control when it is highlighted.
Use to enable or disable the ability to interact with the slider.
Space.Host.ExecutingObject.UISlider.Interactable = true
The maximum allowed value of the slider.
Space.Host.ExecutingObject.UISlider.MaxValue = 20
The minimum allowed value of the slider.
Space.Host.ExecutingObject.UISlider.MinValue = 10
The normal color.
The current value of the slider normalized into a value between 0 and 1.
Space.Log(Space.Host.ExecutingObject.UISlider.NormalizedValue) --displays the current normalized value of the slider in the console
The color of the control when it is pressed.
The current value of the slider.
Space.Log(Space.Host.ExecutingObject.UISlider.Value) --displays the current value of the slider in the console
Should the value only be allowed to be whole numbers?
Space.Host.ExecutingObject.UISlider.WholeNumbers = true --or false