- 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:
parent
3a680ab996
commit
603bdb6094
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Starter addon
|
# VFR Navigator addon
|
||||||
#
|
#
|
||||||
# Slawek Mikula, August 2018
|
# Slawek Mikula, August 2018
|
||||||
|
|
||||||
@ -31,4 +31,20 @@ var main = func( addon ) {
|
|||||||
props.globals.getNode("/sim/menubar/default/menu[2]").addChild("item").setValues(data);
|
props.globals.getNode("/sim/menubar/default/menu[2]").addChild("item").setValues(data);
|
||||||
|
|
||||||
fgcommand("gui-redraw");
|
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");
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<default-padding>3</default-padding>
|
<default-padding>3</default-padding>
|
||||||
|
|
||||||
<color>
|
<color>
|
||||||
<alpha type="float">1.0</alpha>
|
<alpha type="float">0.7</alpha>
|
||||||
</color>
|
</color>
|
||||||
|
|
||||||
<nasal>
|
<nasal>
|
||||||
@ -26,7 +26,6 @@
|
|||||||
fgcommand("dialog-show", n);
|
fgcommand("dialog-show", n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setTransparency(0);
|
|
||||||
|
|
||||||
var reinit = func() {
|
var reinit = func() {
|
||||||
setTransparency(1);
|
setTransparency(1);
|
||||||
@ -71,8 +70,8 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<label>MMM</label>
|
<label>M</label>
|
||||||
<pref-width>22</pref-width>
|
<pref-width>16</pref-width>
|
||||||
<format>%d</format>
|
<format>%d</format>
|
||||||
<property>/gui/map/zoom</property>
|
<property>/gui/map/zoom</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
@ -92,6 +91,18 @@
|
|||||||
</binding>
|
</binding>
|
||||||
</button>
|
</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>
|
<empty><stretch>1</stretch></empty>
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
@ -163,17 +174,21 @@
|
|||||||
<property>/autopilot/route-manager/wp[0]/eta</property>
|
<property>/autopilot/route-manager/wp[0]/eta</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
</text>
|
</text>
|
||||||
|
<group>
|
||||||
|
<layout>hbox</layout>
|
||||||
|
<default-padding>2</default-padding>
|
||||||
<text>
|
<text>
|
||||||
<label>MMMMM</label>
|
<label>MMM</label>
|
||||||
<format>WB %.0f</format>
|
<format>W %.0f</format>
|
||||||
<property>/environment/wind-from-heading-deg</property>
|
<property>/environment/wind-from-heading-deg</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
</text>
|
</text>
|
||||||
<text>
|
<text>
|
||||||
<label>MMMMM</label>
|
<label>MM</label>
|
||||||
<format>WS %.0f</format>
|
<format>/%.0f</format>
|
||||||
<property>/environment/wind-speed-kt</property>
|
<property>/environment/wind-speed-kt</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
</text>
|
</text>
|
||||||
</group>
|
</group>
|
||||||
|
</group>
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
@ -13,6 +13,16 @@
|
|||||||
<alpha type="float">0.7</alpha>
|
<alpha type="float">0.7</alpha>
|
||||||
</color>
|
</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>
|
<group>
|
||||||
<layout>hbox</layout>
|
<layout>hbox</layout>
|
||||||
<default-padding>1</default-padding>
|
<default-padding>1</default-padding>
|
||||||
|
Loading…
Reference in New Issue
Block a user