- vfrmap - center on aircraft button

- vfrmap - wind labels more compact
- vfrmap - default with transparency
- vfrstarter - remember display settings on restarts
- addon-main - show vfrstarter when was shown on latest flight
This commit is contained in:
Slawek Mikula 2018-10-07 14:57:07 +02:00
parent 3a680ab996
commit 603bdb6094
4 changed files with 63 additions and 25 deletions

View File

@ -1,5 +1,5 @@
#
# Starter addon
# VFR Navigator addon
#
# Slawek Mikula, August 2018
@ -31,4 +31,20 @@ var main = func( addon ) {
props.globals.getNode("/sim/menubar/default/menu[2]").addChild("item").setValues(data);
fgcommand("gui-redraw");
var fdm_init_listener = _setlistener("/sim/signals/fdm-initialized", func {
removelistener(fdm_init_listener);
if (getprop("/addons/by-id/" ~ my_addon_id ~ "/showvfrstarter") == 1) {
gui.showDialog("vfrstarter");
}
});
var reinit_listener = _setlistener("/sim/signals/reinit", func {
removelistener(reinit_listener);
if (getprop("/addons/by-id/" ~ my_addon_id ~ "/showvfrstarter") == 1) {
gui.showDialog("vfrstarter");
}
});
}

View File

@ -10,7 +10,7 @@
<default-padding>3</default-padding>
<color>
<alpha type="float">1.0</alpha>
<alpha type="float">0.7</alpha>
</color>
<nasal>
@ -26,7 +26,6 @@
fgcommand("dialog-show", n);
}
}
setTransparency(0);
var reinit = func() {
setTransparency(1);
@ -71,8 +70,8 @@
</button>
<text>
<label>MMM</label>
<pref-width>22</pref-width>
<label>M</label>
<pref-width>16</pref-width>
<format>%d</format>
<property>/gui/map/zoom</property>
<live>true</live>
@ -92,6 +91,18 @@
</binding>
</button>
<button>
<name>center_aircraft</name>
<legend>C</legend>
<pref-width>22</pref-width>
<pref-height>22</pref-height>
<binding>
<command>property-toggle</command>
<property>/gui/map/centre-on-aircraft</property>
</binding>
</button>
<empty><stretch>1</stretch></empty>
<text>
@ -163,17 +174,21 @@
<property>/autopilot/route-manager/wp[0]/eta</property>
<live>true</live>
</text>
<group>
<layout>hbox</layout>
<default-padding>2</default-padding>
<text>
<label>MMMMM</label>
<format>WB %.0f</format>
<label>MMM</label>
<format>W %.0f</format>
<property>/environment/wind-from-heading-deg</property>
<live>true</live>
</text>
<text>
<label>MMMMM</label>
<format>WS %.0f</format>
<label>MM</label>
<format>/%.0f</format>
<property>/environment/wind-speed-kt</property>
<live>true</live>
</text>
</group>
</group>
</PropertyList>

View File

@ -13,6 +13,16 @@
<alpha type="float">0.7</alpha>
</color>
<nasal>
<open>
setprop("/addons/by-id/com.slawekmikula.flightgear.VfrNavigator/showvfrstarter", 1);
</open>
<close>
setprop("/addons/by-id/com.slawekmikula.flightgear.VfrNavigator/showvfrstarter", 0);
</close>
</nasal>
<group>
<layout>hbox</layout>
<default-padding>1</default-padding>

View File

@ -1,4 +1 @@
- wczytywanie planu lotu z PLN
- wczytywanie planu lotu z VfrFlight
- panel planu lotu (vfr)
- wyświetlanie kursu wg. aktualnego leg'a planu logu