pan_setslider(PANEL*, var num, var x, var y, BMAP* bmapBg, BMAP* bmapKnob, var min, var max, var* pv);

Adds or modifies a horizontal or vertical slider on a panel. LC


PANEL* Panel pointer.
num Number of an existing slider (1 = first slider of the panel) or 0 for adding a new slider to the panel.
x, y, ... Parameters similar to the slider element, but with the parameter types given above.


Number of the slider, or 0 if the slider could not be found or created.


var speed = 50;

PANEL* main_pan = { bmap = "main2.pcx"; flags = SHOW; } BMAP* slider_map = "slider.pcx"; BMAP* sliderbg_map = "sliderbg.pcx"; function main() { mouse_mode = 4; // activate mouse pan_setslider(main_pan,0,56,71,sliderbg_map,slider_map,0,100,speed); }

See also:

PANEL, slider, pan_setdigits, pan_setbutton, pan_setwindow, pan_setpos

► latest version online