339 lines
11 KiB
XML
339 lines
11 KiB
XML
<?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[
|
|
var dlg = canvas.Window.new([512, 256], "dialog").set("resize", 1).set("title", "Garmin GPSmap196");
|
|
var gps196Widget = dlg.createCanvas().setColorBackground(0,0,1,1);
|
|
var root = gps196Widget.createGroup();
|
|
|
|
canvas.parsesvg(root, "Aircraft/Instruments-3d/GPSmap196/widget/gpsmap196-widget.svg");
|
|
|
|
var display = root.getElementById("gps196.widget.screen");
|
|
|
|
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.enter", "button-enter"],
|
|
["gps196.widget.button.menu", "button-menu"],
|
|
["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"]
|
|
];
|
|
|
|
foreach(var button; buttons){
|
|
print(button[0]~" & "~button[1]);
|
|
var element = root.getElementById(button[0]);
|
|
element.addEventListener("mousedown", func(e) { setprop("instrumentation/gps196/inputs/"~button[1], 1); });
|
|
element.addEventListener("mouseup", func(e) { setprop("instrumentation/gps196/inputs/"~button[1], 0); });
|
|
element.set("z-index", 11);
|
|
}
|
|
|
|
var background = root.createChild("image").setFile("Aircraft/Instruments-3d/GPSmap196/widget/gpsmap196-widget.png").setSize(512,256).set("z-index",10);
|
|
|
|
var gps196CanvasInstance = canvas.get({name: "GPSmap196-screen"});
|
|
#display.createChild("image").setFile(gps196CanvasInstance);
|
|
|
|
#dlg.setCanvas(canvas.get({name: "GPSmap196-screen"}));
|
|
]]>
|
|
</script>
|
|
</binding>
|
|
</action>
|
|
</animation>
|
|
|
|
</PropertyList>
|