実践KSP

まとめて設定

on init
declare $count
declare ui_slider $a (0,127)
declare ui_slider $b (0,127)
declare ui_slider $c (0,127)
declare ui_slider $d (0,127)
declare ui_slider $e (0,127)
declare ui_slider $f (0,127)
declare %id_slider[6]
%id_slider[0] := get_ui_id($a)
%id_slider[1] := get_ui_id($b)
%id_slider[2] := get_ui_id($c)
%id_slider[3] := get_ui_id($d)
%id_slider[4] := get_ui_id($e)
%id_slider[5] := get_ui_id($f)
$count := 0
while ($count < num_elements(%id_slider))
set_control_par_str (%id_slider[$count],$CONTROL_PAR_PICTURE,"uislider")
set_control_par (%id_slider[$count],$CONTROL_PAR_MOUSE_BEHAVIOUR,-200)
set_control_par (%id_slider[$count],$CONTROL_PAR_DEFAULT_VALUE,100) inc($count)
end while

{ example }
$count := 2
while ($count < num_elements(%id_slider)-1)
set_control_par (%id_slider[$count],$CONTROL_PAR_DEFAULT_VALUE,100)
inc($count)
end while
end on