1
0
Fork 0
fgdata/gui/dialogs/livery-select.xml

62 lines
1.2 KiB
XML
Raw Normal View History

<?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>