min is the minimum value of the slider.
move_action is the name of the actions object that is sent a tick! message when the slider bar is moved. Move actions are sent while the bar is moving.
release_action is the name of the actions object that is sent a tick! message when the slider bar is moved with the mouse and the mouse button is released.
value is the current value of the slider.
vertical indicates that the slider should be displayed vertically. Horizontal is the default mode.
max? returns the value of the max instance variable.
max= sets the value of the max instance variable.
min? returns the value of the min instance variable.
min= sets the value of the min instance variable.
move_action? returns the value of the move_action instance variable.
move_action= sets the value of the move_action instance variable.
release_action? returns the value of the release_action instance variable.
release_action= sets the value of the release_action instance variable.
value? returns the value of the slider.
value= sets the value of the value instance variable and the slider.
vertical? returns the value of the vertical instance variable.
vertical= sets the value of the vertical instance variable.
ui create!;
ui_control_panel new: cp parent= ui;
/* create sliders */
ui_slider new: slider1 parent= cp min= 0 max= 100 vertical= 1 release_action = slider_release_action create! @ x : 10 @ y : 10 @ width : 15 @ height : 100 ;
actions new: slider_release_action tick_actions= `string new: temp_string float_format= `0' = `! slider current value = ' + [slider1 value?]; parser parse: temp_string; temp_string free!;';
/* add exit button */
ui_button new: exit_button parent= cp label= "exit" create! @ x : 50 @ y : 110
action= "exit_action";
actions new: exit_action tick_actions= "ui exit!";
/* display it! */
ui on! start!;