Creation/Dev/Script/Client/GuiSliderCtrl: Difference between revisions
From Graal Bible
mNo edit summary |
Pooper200000 (talk | contribs) No edit summary |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Scripting Reference]] | |||
Inherits [[Creation/Dev/Script/Client/GuiControl|GuiControl]]. | |||
=Description= | |||
[[Image:Guicontrol_slider.png]] | |||
Displays a bar where the user can move the slider from the left to the right side. It uses the variables ''range'' (minimum and maximum) and ''value'' which is automatically updated to the slider position. | |||
=Variables= | |||
{| border="1" cellpadding="2" width="100%" | |||
| '''Name''' | |||
| '''Type''' | |||
| '''Description''' | |||
|- | |||
| range | |||
| string | |||
| | |||
|- | |||
| ticks | |||
| integer | |||
| | |||
|- | |||
| value | |||
| float | |||
| Current value | |||
|} | |||
=Events= | |||
onAction(newvalue) - the slider has been moved | |||
onReleaseSlider(value) - the left mouse button been released after moving the slider | |||
=Example= | |||
<pre> | <pre> | ||
new GuiSliderCtrl("Test_Slider") { | |||
profile = GuiBlueSliderProfile; | |||
x = 10; | |||
y = 10; | |||
width = 160; | |||
height = 20; | |||
range = {0,100}; | |||
value = 30; | |||
ticks = 10; | |||
} | |||
</pre> | </pre> |
Latest revision as of 23:55, 15 February 2010
Inherits GuiControl.
Description
Displays a bar where the user can move the slider from the left to the right side. It uses the variables range (minimum and maximum) and value which is automatically updated to the slider position.
Variables
Name | Type | Description |
range | string | |
ticks | integer | |
value | float | Current value |
Events
onAction(newvalue) - the slider has been moved
onReleaseSlider(value) - the left mouse button been released after moving the slider
Example
new GuiSliderCtrl("Test_Slider") { profile = GuiBlueSliderProfile; x = 10; y = 10; width = 160; height = 20; range = {0,100}; value = 30; ticks = 10; }