- re-open after gui-reinit
- only update once per sec - cosmetics
This commit is contained in:
parent
3cf6667328
commit
ab1e00a81e
1 changed files with 5 additions and 7 deletions
|
@ -187,6 +187,7 @@ var dialog = {
|
||||||
me.listeners=[];
|
me.listeners=[];
|
||||||
append(me.listeners, setlistener("/sim/startup/xsize", func me._redraw_()));
|
append(me.listeners, setlistener("/sim/startup/xsize", func me._redraw_()));
|
||||||
append(me.listeners, setlistener("/sim/startup/ysize", func me._redraw_()));
|
append(me.listeners, setlistener("/sim/startup/ysize", func me._redraw_()));
|
||||||
|
append(me.listeners, setlistener("/sim/signals/reinit-gui", func me._redraw_()));
|
||||||
append(me.listeners, setlistener("/sim/signals/multiplayer-updated", func me.update()));
|
append(me.listeners, setlistener("/sim/signals/multiplayer-updated", func me.update()));
|
||||||
},
|
},
|
||||||
create: func {
|
create: func {
|
||||||
|
@ -278,7 +279,7 @@ var dialog = {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (PILOTSDLG_RUNNING)
|
if (PILOTSDLG_RUNNING)
|
||||||
settimer( func me.update(), 0.4, 1);
|
settimer(func me.update(), 1, 1);
|
||||||
},
|
},
|
||||||
_redraw_: func {
|
_redraw_: func {
|
||||||
if (me.dialog != nil) {
|
if (me.dialog != nil) {
|
||||||
|
@ -288,16 +289,13 @@ var dialog = {
|
||||||
},
|
},
|
||||||
toggle_unit: func {
|
toggle_unit: func {
|
||||||
me.unit = !me.unit;
|
me.unit = !me.unit;
|
||||||
if(me.unit)
|
if (me.unit) {
|
||||||
{
|
|
||||||
me.alt_node = "position/altitude-m";
|
me.alt_node = "position/altitude-m";
|
||||||
me.alt_hdr = "alt-m";
|
me.alt_hdr = "alt-m";
|
||||||
me.dist_hdr = "dist-km";
|
me.dist_hdr = "dist-km";
|
||||||
me.dist_node = "distance-to-km";
|
me.dist_node = "distance-to-km";
|
||||||
me.unit_button = "IM";
|
me.unit_button = "IM";
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
me.alt_node = "position/altitude-ft";
|
me.alt_node = "position/altitude-ft";
|
||||||
me.dist_node = "distance-to-nm";
|
me.dist_node = "distance-to-nm";
|
||||||
me.alt_hdr = "alt-ft";
|
me.alt_hdr = "alt-ft";
|
||||||
|
|
Loading…
Reference in a new issue