- refactoring to the current addon specification
- usage documentation
This commit is contained in:
183
gui/dialogs/vfrmap-settings.xml
Normal file
183
gui/dialogs/vfrmap-settings.xml
Normal file
@@ -0,0 +1,183 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<PropertyList>
|
||||
<name>vfrmap-settings</name>
|
||||
<layout>vbox</layout>
|
||||
<resizable>false</resizable>
|
||||
<default-padding>3</default-padding>
|
||||
|
||||
<color>
|
||||
<alpha type="float">1.0</alpha>
|
||||
</color>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<default-padding>1</default-padding>
|
||||
<empty><stretch>1</stretch></empty>
|
||||
|
||||
<text>
|
||||
<label>Map Settings</label>
|
||||
</text>
|
||||
|
||||
<empty><stretch>1</stretch></empty>
|
||||
|
||||
<button>
|
||||
<pref-width>16</pref-width>
|
||||
<pref-height>16</pref-height>
|
||||
<legend></legend>
|
||||
<keynum>27</keynum>
|
||||
<border>2</border>
|
||||
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<stretch>true</stretch>
|
||||
<halign>fill</halign>
|
||||
|
||||
<group>
|
||||
<layout>vbox</layout>
|
||||
<text>
|
||||
<label>Display:</label>
|
||||
</text>
|
||||
|
||||
<checkbox>
|
||||
<label>Fixes</label>
|
||||
<halign>left</halign>
|
||||
<property>/gui/map/draw-fixes</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Navaids</label>
|
||||
<halign>left</halign>
|
||||
<property>/gui/map/draw-navaids</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Traffic</label>
|
||||
<halign>left</halign>
|
||||
<property>/gui/map/draw-traffic</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Data</label>
|
||||
<halign>left</halign>
|
||||
<property>/gui/map/draw-data</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Flight History</label>
|
||||
<halign>left</halign>
|
||||
<property>/gui/map/draw-flight-history</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<empty><stretch>true</stretch></empty>
|
||||
|
||||
<checkbox>
|
||||
<label>Magnetic Hdgs</label>
|
||||
<halign>left</halign>
|
||||
<property>/gui/map/magnetic-headings</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Center on Acft</label>
|
||||
<halign>left</halign>
|
||||
<property>/gui/map/centre-on-aircraft</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Aircraft Hdg Up</label>
|
||||
<halign>left</halign>
|
||||
<property>/gui/map/aircraft-heading-up</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Transparent</label>
|
||||
<halign>left</halign>
|
||||
<property>/gui/map/transparent</property>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
</binding>
|
||||
</checkbox>
|
||||
|
||||
<empty><stretch>true</stretch></empty>
|
||||
|
||||
<button>
|
||||
<name>close</name>
|
||||
<legend>Close</legend>
|
||||
<pref-width>100</pref-width>
|
||||
<default>true</default>
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
</group>
|
||||
</group>
|
||||
</PropertyList>
|
||||
194
gui/dialogs/vfrmap.xml
Normal file
194
gui/dialogs/vfrmap.xml
Normal file
@@ -0,0 +1,194 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<PropertyList>
|
||||
<name>vfrmap</name>
|
||||
<layout>vbox</layout>
|
||||
<resizable>true</resizable>
|
||||
<modal>false</modal>
|
||||
<x>5</x>
|
||||
<y>5</y>
|
||||
<default-padding>3</default-padding>
|
||||
|
||||
<color>
|
||||
<alpha type="float">0.7</alpha>
|
||||
</color>
|
||||
|
||||
<nasal>
|
||||
<open>
|
||||
var mapDialog = cmdarg();
|
||||
var setTransparency = func(updateDialog){
|
||||
var alpha = (getprop("/gui/map/transparent") or 0);
|
||||
mapDialog.getNode("color/alpha").setValue(1-alpha*0.3);
|
||||
if (updateDialog)
|
||||
{
|
||||
var n = props.Node.new({ "dialog-name": "vfrmap" });
|
||||
fgcommand("dialog-close", n);
|
||||
fgcommand("dialog-show", n);
|
||||
}
|
||||
}
|
||||
|
||||
var reinit = func() {
|
||||
setTransparency(1);
|
||||
}
|
||||
|
||||
var transparency_listener = setlistener("/gui/map/transparent", reinit, 0, 0);
|
||||
</open>
|
||||
|
||||
<close>
|
||||
removelistener(transparency_listener);
|
||||
</close>
|
||||
</nasal>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<default-padding>1</default-padding>
|
||||
|
||||
<button>
|
||||
<pref-width>48</pref-width>
|
||||
<pref-height>24</pref-height>
|
||||
<legend>config</legend>
|
||||
<keynum>27</keynum>
|
||||
<border>2</border>
|
||||
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>vfrmap-settings</dialog-name>
|
||||
</binding>
|
||||
</button>
|
||||
<button>
|
||||
<name>zoomout</name>
|
||||
<legend>-</legend>
|
||||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/gui/map/zoom</property>
|
||||
<min>0</min>
|
||||
<step>-1</step>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<text>
|
||||
<label>M</label>
|
||||
<pref-width>16</pref-width>
|
||||
<format>%d</format>
|
||||
<property>/gui/map/zoom</property>
|
||||
<live>true</live>
|
||||
</text>
|
||||
|
||||
<button>
|
||||
<name>zoomin</name>
|
||||
<legend>+</legend>
|
||||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
|
||||
<binding>
|
||||
<command>property-adjust</command>
|
||||
<property>/gui/map/zoom</property>
|
||||
<step>1</step>
|
||||
<max>12</max>
|
||||
</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>
|
||||
<label>Map</label>
|
||||
</text>
|
||||
|
||||
<empty><stretch>1</stretch></empty>
|
||||
|
||||
<button>
|
||||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
<legend>X</legend>
|
||||
<keynum>27</keynum>
|
||||
<border>2</border>
|
||||
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<stretch>true</stretch>
|
||||
<halign>fill</halign>
|
||||
|
||||
<group>
|
||||
<layout>vbox</layout>
|
||||
<stretch>true</stretch>
|
||||
|
||||
<map>
|
||||
<halign>fill</halign>
|
||||
<valign>fill</valign>
|
||||
<stretch>true</stretch>
|
||||
<pref-height>200</pref-height>
|
||||
<pref-width>300</pref-width>
|
||||
<property>/gui/map</property>
|
||||
</map>
|
||||
</group>
|
||||
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<default-padding>2</default-padding>
|
||||
<text>
|
||||
<label>MMMMM</label>
|
||||
<format>%s</format>
|
||||
<property>/autopilot/route-manager/wp[0]/id</property>
|
||||
<live>true</live>
|
||||
</text>
|
||||
<text>
|
||||
<label>MMMMM</label>
|
||||
<format>B %.0f</format>
|
||||
<property>/autopilot/route-manager/wp[0]/true-bearing-deg</property>
|
||||
<live>true</live>
|
||||
</text>
|
||||
<text>
|
||||
<label>MMMMM</label>
|
||||
<format>D %.2f nm</format>
|
||||
<property>/autopilot/route-manager/wp[0]/dist</property>
|
||||
<live>true</live>
|
||||
</text>
|
||||
<text>
|
||||
<label>MMMMM</label>
|
||||
<format>ETA %s</format>
|
||||
<property>/autopilot/route-manager/wp[0]/eta</property>
|
||||
<live>true</live>
|
||||
</text>
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<default-padding>2</default-padding>
|
||||
<text>
|
||||
<label>MMM</label>
|
||||
<format>W %.0f</format>
|
||||
<property>/environment/wind-from-heading-deg</property>
|
||||
<live>true</live>
|
||||
</text>
|
||||
<text>
|
||||
<label>MM</label>
|
||||
<format>/%.0f</format>
|
||||
<property>/environment/wind-speed-kt</property>
|
||||
<live>true</live>
|
||||
</text>
|
||||
</group>
|
||||
</group>
|
||||
</PropertyList>
|
||||
115
gui/dialogs/vfrstarter.xml
Normal file
115
gui/dialogs/vfrstarter.xml
Normal file
@@ -0,0 +1,115 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<PropertyList>
|
||||
<name>vfrstarter</name>
|
||||
<layout>vbox</layout>
|
||||
<resizable>false</resizable>
|
||||
<modal>false</modal>
|
||||
<x>-5</x>
|
||||
<y>-5</y>
|
||||
<default-padding>3</default-padding>
|
||||
|
||||
<color>
|
||||
<alpha type="float">0.7</alpha>
|
||||
</color>
|
||||
|
||||
<nasal>
|
||||
<open>
|
||||
setprop("/addons/by-id/com.slawekmikula.flightgear.VfrNavigator/addon-devel/showvfrstarter", 1);
|
||||
</open>
|
||||
|
||||
<close>
|
||||
setprop("/addons/by-id/com.slawekmikula.flightgear.VfrNavigator/addon-devel/showvfrstarter", 0);
|
||||
</close>
|
||||
</nasal>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<default-padding>1</default-padding>
|
||||
|
||||
<button>
|
||||
<pref-width>27</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
<legend>MP</legend>
|
||||
<border>2</border>
|
||||
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>vfrmap</dialog-name>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button>
|
||||
<pref-width>27</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
<legend>PL</legend>
|
||||
<border>2</border>
|
||||
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>vfrtable</dialog-name>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button>
|
||||
<pref-width>27</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
<legend>SW</legend>
|
||||
<border>2</border>
|
||||
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>stopwatch-dialog</dialog-name>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button>
|
||||
<pref-width>27</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
<legend>R</legend>
|
||||
<border>2</border>
|
||||
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>radios</dialog-name>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button>
|
||||
<pref-width>27</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
<legend>A</legend>
|
||||
<border>2</border>
|
||||
|
||||
<binding>
|
||||
<command>ATC-freq-search</command>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button>
|
||||
<pref-width>27</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
<legend>RM</legend>
|
||||
<border>2</border>
|
||||
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>route-manager</dialog-name>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<empty><stretch>1</stretch></empty>
|
||||
|
||||
<button>
|
||||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
<legend>X</legend>
|
||||
<border>2</border>
|
||||
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
||||
</PropertyList>
|
||||
68
gui/dialogs/vfrtable.xml
Normal file
68
gui/dialogs/vfrtable.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PropertyList>
|
||||
<name>vfrtable</name>
|
||||
<layout>vbox</layout>
|
||||
<resizable>true</resizable>
|
||||
<x>5</x>
|
||||
<y>-5</y>
|
||||
<default-padding>3</default-padding>
|
||||
|
||||
<color>
|
||||
<alpha type="float">0.7</alpha>
|
||||
</color>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<default-padding>2</default-padding>
|
||||
<text>
|
||||
<label>MMMMMMMMMMMMMMMM</label>
|
||||
<format>Target: %s</format>
|
||||
<property>/autopilot/route-manager/wp[0]/id</property>
|
||||
<live>true</live>
|
||||
</text>
|
||||
<text>
|
||||
<label>MMMMMMMMM</label>
|
||||
<format>Dist: %.2f nm</format>
|
||||
<property>/autopilot/route-manager/wp[0]/dist</property>
|
||||
<live>true</live>
|
||||
</text>
|
||||
<text>
|
||||
<label>MMMMMMMMM</label>
|
||||
<format>ETA: %s</format>
|
||||
<property>/autopilot/route-manager/wp[0]/eta</property>
|
||||
<live>true</live>
|
||||
</text>
|
||||
|
||||
<empty><stretch>1</stretch></empty>
|
||||
|
||||
<button>
|
||||
<pref-width>22</pref-width>
|
||||
<pref-height>22</pref-height>
|
||||
<legend>X</legend>
|
||||
<border>2</border>
|
||||
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<default-padding>2</default-padding>
|
||||
<stretch>true</stretch>
|
||||
<halign>fill</halign>
|
||||
<valign>fill</valign>
|
||||
<waypointlist>
|
||||
<name>list</name>
|
||||
<halign>fill</halign>
|
||||
<valign>fill</valign>
|
||||
<stretch>true</stretch>
|
||||
<pref-height>150</pref-height>
|
||||
<property>/sim/gui/dialogs/route-manager/selection</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
<object-name>list</object-name>
|
||||
</binding>
|
||||
</waypointlist>
|
||||
</group>
|
||||
</PropertyList>
|
||||
Reference in New Issue
Block a user