1
0
Fork 0

add dialogs/nasal-test.xml

This commit is contained in:
Henning Stahlke 2020-05-24 20:52:45 +02:00 committed by James Turner
parent 5868c25ebc
commit e1bda05f7d
2 changed files with 74 additions and 0 deletions

View file

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
<name>nasal-test</name>
<layout>vbox</layout>
<pref-width>180</pref-width>
<color>
<red>0.1</red>
<green>0.3</green>
<blue>0.7</blue>
<alpha>0.9</alpha>
</color>
<group>
<layout>hbox</layout>
<empty>
<stretch>1</stretch>
</empty>
<text>
<label>Run Nasal test</label>
</text>
<empty>
<stretch>1</stretch>
</empty>
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend>X</legend>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<hrule />
<group>
<layout>vbox</layout>
<valign>top</valign>
<text>Specify .nut file in $FGROOT/Nasal</text>
<group>
<layout>hbox</layout>
<input>
<pref-width>100</pref-width>
<halign>left</halign>
<property>/_debug/nas/test/filename</property>
<label>.nut</label>
<binding>
<command>dialog-apply</command>
</binding>
<live type="bool">true</live>
</input>
</group>
<button>
<legend>Run test</legend>
<binding>
<command>nasal</command>
<script>
var file = getprop("/sim/fg-root")~"/Nasal/"
~getprop("/_debug/nas/test/filename")~".nut";
print(file);
fgcommand("nasal-test", props.Node.new({"path": file}));
</script>
</binding>
</button>
</group>
</PropertyList>

View file

@ -747,6 +747,14 @@
<script>console.CanvasPlacement.new()</script>
</binding>
</item>
<item>
<name>nasal-test</name>
<binding>
<command>dialog-show</command>
<dialog-name>nasal-test</dialog-name>
</binding>
</item>
<item>
<name>development-keys</name>