2014-05-12 19:15:12 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
|
|
<PropertyList>
|
|
|
|
|
|
|
|
<path>gpsmap196.ac</path>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<object-name>gps196.body</object-name>
|
|
|
|
<object-name>gps196.screen</object-name>
|
|
|
|
<object-name>gps196.antenna</object-name>
|
|
|
|
<object-name>gps196.rocker.up</object-name>
|
|
|
|
<object-name>gps196.button.in</object-name>
|
|
|
|
<object-name>gps196.button.dto</object-name>
|
|
|
|
<object-name>gps196.button.out</object-name>
|
|
|
|
<object-name>gps196.button.menu</object-name>
|
|
|
|
<object-name>gps196.button.nrst</object-name>
|
|
|
|
<object-name>gps196.button.page</object-name>
|
|
|
|
<object-name>gps196.button.quit</object-name>
|
|
|
|
<object-name>gps196.rocker.down</object-name>
|
|
|
|
<object-name>gps196.rocker.left</object-name>
|
|
|
|
<object-name>gps196.button.power</object-name>
|
|
|
|
<object-name>gps196.rocker.right</object-name>
|
|
|
|
<object-name>gps196.button.enter</object-name>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<type>pick</type>
|
|
|
|
<object-name>gps196.button.dto</object-name>
|
|
|
|
<action>
|
|
|
|
<button>0</button>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-dto</property>
|
|
|
|
<value type="bool">true</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-dto</property>
|
|
|
|
<value type="bool">false</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</action>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<type>pick</type>
|
|
|
|
<object-name>gps196.button.enter</object-name>
|
|
|
|
<action>
|
|
|
|
<button>0</button>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-enter</property>
|
|
|
|
<value type="bool">true</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-enter</property>
|
|
|
|
<value type="bool">false</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</action>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<type>pick</type>
|
|
|
|
<object-name>gps196.button.in</object-name>
|
|
|
|
<action>
|
|
|
|
<button>0</button>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-in</property>
|
|
|
|
<value type="bool">true</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-in</property>
|
|
|
|
<value type="bool">false</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</action>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<type>pick</type>
|
|
|
|
<object-name>gps196.button.menu</object-name>
|
|
|
|
<action>
|
|
|
|
<button>0</button>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-menu</property>
|
|
|
|
<value type="bool">true</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-menu</property>
|
|
|
|
<value type="bool">false</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</action>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<type>pick</type>
|
|
|
|
<object-name>gps196.button.nrst</object-name>
|
|
|
|
<action>
|
|
|
|
<button>0</button>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-nrst</property>
|
|
|
|
<value type="bool">true</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-nrst</property>
|
|
|
|
<value type="bool">false</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</action>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<type>pick</type>
|
|
|
|
<object-name>gps196.button.out</object-name>
|
|
|
|
<action>
|
|
|
|
<button>0</button>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-out</property>
|
|
|
|
<value type="bool">true</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-out</property>
|
|
|
|
<value type="bool">false</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</action>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<type>pick</type>
|
|
|
|
<object-name>gps196.button.page</object-name>
|
|
|
|
<action>
|
|
|
|
<button>0</button>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-page</property>
|
|
|
|
<value type="bool">true</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-page</property>
|
|
|
|
<value type="bool">false</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</action>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<type>pick</type>
|
|
|
|
<object-name>gps196.button.power</object-name>
|
|
|
|
<action>
|
|
|
|
<button>0</button>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-power</property>
|
|
|
|
<value type="bool">true</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-power</property>
|
|
|
|
<value type="bool">false</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</action>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<type>pick</type>
|
|
|
|
<object-name>gps196.button.quit</object-name>
|
|
|
|
<action>
|
|
|
|
<button>0</button>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-quit</property>
|
|
|
|
<value type="bool">true</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/button-quit</property>
|
|
|
|
<value type="bool">false</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</action>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<type>pick</type>
|
|
|
|
<object-name>gps196.rocker.down</object-name>
|
|
|
|
<action>
|
|
|
|
<button>0</button>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/rocker-down</property>
|
|
|
|
<value type="bool">true</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/rocker-down</property>
|
|
|
|
<value type="bool">false</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</action>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<type>pick</type>
|
|
|
|
<object-name>gps196.rocker.left</object-name>
|
|
|
|
<action>
|
|
|
|
<button>0</button>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/rocker-left</property>
|
|
|
|
<value type="bool">true</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/rocker-left</property>
|
|
|
|
<value type="bool">false</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</action>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<type>pick</type>
|
|
|
|
<object-name>gps196.rocker.right</object-name>
|
|
|
|
<action>
|
|
|
|
<button>0</button>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/rocker-right</property>
|
|
|
|
<value type="bool">true</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/rocker-right</property>
|
|
|
|
<value type="bool">false</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</action>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<type>pick</type>
|
|
|
|
<object-name>gps196.rocker.up</object-name>
|
|
|
|
<action>
|
|
|
|
<button>0</button>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/rocker-up</property>
|
|
|
|
<value type="bool">true</value>
|
|
|
|
</binding>
|
|
|
|
<mod-up>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>instrumentation/gps196/inputs/rocker-up</property>
|
|
|
|
<value type="bool">false</value>
|
|
|
|
</binding>
|
|
|
|
</mod-up>
|
|
|
|
</action>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
<animation>
|
|
|
|
<type>pick</type>
|
|
|
|
<object-name>gps196.screen</object-name>
|
|
|
|
<action>
|
|
|
|
<button>0</button>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
<![CDATA[
|
2014-05-14 17:58:40 +00:00
|
|
|
var gps196CanvasInstance = canvas.get({name: "GPSmap196-screen"});
|
|
|
|
var dlg = canvas.Window.new([1024, 512], "dialog").set("title", "Garmin GPSmap196");
|
|
|
|
var buttons = [
|
|
|
|
["gps196.widget.button.in", "button-in"], ["gps196.widget.button.out", "button-out"],
|
|
|
|
["gps196.widget.button.dto", "button-dto"], ["gps196.widget.button.page", "button-page"],
|
|
|
|
["gps196.widget.button.quit", "button-quit"], ["gps196.widget.button.nrst", "button-nrst"],
|
|
|
|
["gps196.widget.button.menu", "button-menu"], ["gps196.widget.button.enter", "button-enter"],
|
|
|
|
["gps196.widget.button.power", "button-power"], ["gps196.widget.rocker.up", "rocker-up"],
|
|
|
|
["gps196.widget.rocker.down", "rocker-down"], ["gps196.widget.rocker.left", "rocker-left"],
|
|
|
|
["gps196.widget.rocker.right", "rocker-right"]
|
|
|
|
];
|
|
|
|
|
2014-05-14 08:48:41 +00:00
|
|
|
var gps196Widget = dlg.createCanvas().setColorBackground(1,1,1,1);
|
2014-05-13 10:34:28 +00:00
|
|
|
var root = gps196Widget.createGroup();
|
|
|
|
canvas.parsesvg(root, "Aircraft/Instruments-3d/GPSmap196/widget/gpsmap196-widget.svg");
|
|
|
|
|
2014-05-14 17:58:40 +00:00
|
|
|
var setButtonListener = func(btn, prop) {
|
|
|
|
root.getElementById(btn).addEventListener("mousedown", func(e) { setprop("instrumentation/gps196/inputs/"~prop, 1); });
|
|
|
|
root.getElementById(btn).addEventListener("mouseup", func(e) { setprop("instrumentation/gps196/inputs/"~prop, 0); });
|
|
|
|
root.getElementById(btn).set("z-index", 11);
|
2014-05-14 06:30:02 +00:00
|
|
|
}
|
|
|
|
|
2014-05-14 17:58:40 +00:00
|
|
|
for( var i=0; i<size(buttons); i=i+1){
|
|
|
|
setButtonListener(buttons[i][0], buttons[i][1]);
|
|
|
|
}
|
2014-05-13 10:34:28 +00:00
|
|
|
|
2014-05-14 17:58:40 +00:00
|
|
|
var background = root.createChild("image");
|
|
|
|
background.setFile("Aircraft/Instruments-3d/GPSmap196/widget/gpsmap196-widget.png").setSize(1024,512).set("z-index",10);
|
2014-05-13 10:34:28 +00:00
|
|
|
|
2014-05-14 17:58:40 +00:00
|
|
|
var canvasScreenWidget = root.createChild("image");
|
|
|
|
canvasScreenWidget.setFile(gps196CanvasInstance.getPath()).setSize(563,359).setTranslation(87,53).set("z-index", 11);
|
2014-05-12 19:15:12 +00:00
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
</action>
|
|
|
|
</animation>
|
|
|
|
|
|
|
|
</PropertyList>
|