1
0
Fork 0

livery selection dialog -- see aircraft.nas -> livery

This commit is contained in:
mfranz 2007-06-04 13:46:24 +00:00
parent 95caf1a918
commit 72668e2931

View file

@ -0,0 +1,61 @@
<?xml version="1.0"?>
<PropertyList>
<name>livery-select</name>
<layout>vbox</layout>
<x>-20</x>
<pref-width>200</pref-width>
<nasal>
<open>
var list = cmdarg().getNode("list");
list.removeChildren("value");
var names = sort(keys(aircraft.livery.data), cmp);
forindex (var i; names)
list.getChild("value", i, 1).setValue(names[i]);
</open>
</nasal>
<group>
<layout>hbox</layout>
<empty><stretch>1</stretch></empty>
<text>
<label>Select Livery</label>
</text>
<empty><stretch>1</stretch></empty>
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<default>1</default>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>nasal</command>
<script>aircraft.livery.dialog.close()</script>
</binding>
</button>
</group>
<hrule/>
<list>
<halign>fill</halign>
<pref-height>200</pref-height>
<property>/sim/gui/dialogs/livery-select/name</property>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
var name = getprop("/sim/gui/dialogs/livery-select/name");
aircraft.livery.select(name);
</script>
</binding>
</list>
</PropertyList>