User Interface Commands
89
KSP Reference Manual
12.12. get_ui_id()
get_ui_id( )
Retrieve the ID number of a UI control
Examples
on init
declare ui_knob $Knob_1 (0,100,1)
declare ui_knob $Knob_2 (0,100,1)
declare ui_knob $Knob_3 (0,100,1)
declare ui_knob $Knob_4 (0,100,1)
declare ui_value_edit $Set(0,100,1)
declare $a
declare %knob_id[4]
%knob_id[0] := get_ui_id ($Knob_1)
%knob_id[1] := get_ui_id ($Knob_2)
%knob_id[2] := get_ui_id ($Knob_3)
%knob_id[3] := get_ui_id ($Knob_4)
end on
on ui_control ($Set)
$a := 0
while ($a < 4)
set_control_par(%knob_id[$a],$CONTROL_PAR_VALUE,$Set)
inc($a)
end while
end on
Store IDs in an array
See Also
set_control_par()
get_control_par()
12.13. get_ui_wf_property()
get_ui_wf_property(,
,)
Returns the value of the waveform’s different properties
The variable of the UI waveform
Do'stlaringiz bilan baham: |