slider (x, y, bmapScale, bmapKnob, min, max, var);

hslider (x, y, length, bmapKnob, min, max, var);

vslider (x, y, length, bmapKnob, min, max, var);

Horizontal or vertical slider that can be dragged with the mouse for entering values into variables.

Parameter

x X position within the panel
y Y position within the panel
bmapScale Bitmap or image file name for the slider scale; also determines the slider direction. If the height of the bitmap is greater than its width, it's a vertical slider, otherwise a horizontal slider.
length Range of the slider in pixels.
bmapKnob Bitmap or image file name for the slider knob.
min Value at the left/upper end.
max Value at the right/lower end.
var Global var to be modified by the slider. If moved to the upper or left position, var is set to the min value, at the lower or right position it is set to the max value.

Remarks:

Example:

hslider(10,10,40,slider_map,1,8,my_var); // shifts my_var from 1 to 8 over 40 pixels 		

See also:

PANEL, button, needle, window, digits, pan_setslider

► latest version online