misc presentation

This commit is contained in:
Pascal Brisset
2006-11-21 15:25:14 +00:00
parent fb84d4f906
commit 1754aae3fc
2 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -222,9 +222,9 @@ module Make(AircraftItl : AIRCRAFT_ITL) = struct
let take_off = fun () -> FlightModel.set_air_speed !state FM.nominal_airspeed in
let hbox = GPack.hbox ~packing:vbox#pack () in
let hbox = GPack.hbox ~spacing:4 ~packing:vbox#pack () in
if not !autoboot then begin
let s = GButton.button ~label:"Boot" ~packing:(hbox#pack ~padding:5) () in
let s = GButton.button ~label:"Boot" ~packing:(hbox#pack) () in
ignore (s#connect#clicked ~callback:boot)
end else
boot ();
+5 -4
View File
@@ -119,7 +119,7 @@ module Make(A:Data.MISSION) = struct
external sim_init : unit -> unit = "sim_init"
external update_bat : int -> unit = "update_bat"
let bat_button = GButton.toggle_button ~label:"Bat" ()
let bat_button = GButton.check_button ~label:"Auto" ~active:false ()
let my_id = ref (-1)
let init = fun id vbox ->
@@ -127,12 +127,13 @@ module Make(A:Data.MISSION) = struct
my_id := id;
sim_init ();
let hbox = GPack.hbox ~packing:vbox#add () in
let hbox = GPack.hbox ~spacing:4 ~packing:vbox#add () in
let _label = GMisc.label ~text:"Bat (V) " ~packing:hbox#pack () in
let _scale = GRange.scale `HORIZONTAL ~adjustment:adj_bat ~packing:hbox#add () in
let update = fun () -> update_bat (truncate (adj_bat#value *. 10.)) in
hbox#pack bat_button#coerce;
let tips = GData.tooltips () in
tips#set_tip bat_button#coerce ~text:"Select for auto-decreasing voltage";
let _scale = GRange.scale `HORIZONTAL ~adjustment:adj_bat ~packing:hbox#add () in
let update = fun () -> update_bat (truncate (adj_bat#value *. 10.)) in
ignore (adj_bat#connect#value_changed update);
update ()