Creation/Dev/Script/Client/GuiSliderCtrl

From Graal Bible
Revision as of 19:01, 16 September 2006 by Stefan (talk | contribs) (Added picture, description and an example script)

Inherits GuiControl.

Description

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

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;
}