Updated pilot offset dialog from Henning
(Happy birthday!)
This commit is contained in:
parent
d6da41c617
commit
47a5ffe3d1
1 changed files with 305 additions and 125 deletions
|
@ -1,140 +1,320 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>pilot_offset</name>
|
<name>pilot_offset</name>
|
||||||
<layout>vbox</layout>
|
<layout>vbox</layout>
|
||||||
|
<width>450</width>
|
||||||
|
<nasal>
|
||||||
|
<open>
|
||||||
|
<![CDATA[
|
||||||
|
var view_listener = setlistener("sim/current-view/view-number-raw", func(n) {
|
||||||
|
var x = getprop("sim/view["~int(n.getValue())~"]/config/x-offset-m");
|
||||||
|
var y = getprop("sim/view["~int(n.getValue())~"]/config/y-offset-m");
|
||||||
|
var z = getprop("sim/view["~int(n.getValue())~"]/config/z-offset-m");
|
||||||
|
setprop("sim/current-view/config/x-offset-m", x);
|
||||||
|
setprop("sim/current-view/config/y-offset-m", y);
|
||||||
|
setprop("sim/current-view/config/z-offset-m", z);
|
||||||
|
|
||||||
<group>
|
},1,0);
|
||||||
<layout>hbox</layout>
|
]]>
|
||||||
<empty><stretch>1</stretch></empty>
|
</open>
|
||||||
|
<close>
|
||||||
|
<![CDATA[
|
||||||
|
removelistener(view_listener);
|
||||||
|
props.getNode("sim/current-view/config/x-offset-m").remove();
|
||||||
|
props.getNode("sim/current-view/config/y-offset-m").remove();
|
||||||
|
props.getNode("sim/current-view/config/z-offset-m").remove();
|
||||||
|
]]>
|
||||||
|
</close>
|
||||||
|
</nasal>
|
||||||
|
|
||||||
<text>
|
<group>
|
||||||
<label>Adjust View Position</label>
|
<layout>hbox</layout>
|
||||||
</text>
|
<empty><stretch>1</stretch></empty>
|
||||||
|
<text>
|
||||||
|
<label>Adjust View Position</label>
|
||||||
|
</text>
|
||||||
|
<empty><stretch>1</stretch></empty>
|
||||||
|
<button>
|
||||||
|
<pref-width>16</pref-width>
|
||||||
|
<pref-height>16</pref-height>
|
||||||
|
<legend></legend>
|
||||||
|
<keynum>27</keynum>
|
||||||
|
<border>2</border>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-close</command>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
</group>
|
||||||
|
|
||||||
<empty><stretch>1</stretch></empty>
|
<hrule/>
|
||||||
|
|
||||||
<button>
|
<group>
|
||||||
<pref-width>16</pref-width>
|
<layout>table</layout>
|
||||||
<pref-height>16</pref-height>
|
<text>
|
||||||
<legend></legend>
|
<row>0</row>
|
||||||
<keynum>27</keynum>
|
<col>0</col>
|
||||||
<border>2</border>
|
<label>left</label>
|
||||||
<binding>
|
</text>
|
||||||
<command>dialog-close</command>
|
<button>
|
||||||
</binding>
|
<row>0</row>
|
||||||
</button>
|
<col>1</col>
|
||||||
</group>
|
<pref-width>25</pref-width>
|
||||||
|
<pref-height>25</pref-height>
|
||||||
|
<legend><<</legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>/sim/current-view/x-offset-m</property>
|
||||||
|
<step>-0.1</step>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
<button>
|
||||||
|
<row>0</row>
|
||||||
|
<col>2</col>
|
||||||
|
<pref-width>25</pref-width>
|
||||||
|
<pref-height>25</pref-height>
|
||||||
|
<legend><</legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>/sim/current-view/x-offset-m</property>
|
||||||
|
<step>-0.01</step>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
<input>
|
||||||
|
<row>0</row>
|
||||||
|
<col>3</col>
|
||||||
|
<name>offset-x</name>
|
||||||
|
<pref-width>65</pref-width>
|
||||||
|
<label>m</label>
|
||||||
|
<live>true</live>
|
||||||
|
<property>/sim/current-view/x-offset-m</property>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-apply</command>
|
||||||
|
<object-name>offset-x</object-name>
|
||||||
|
</binding>
|
||||||
|
</input>
|
||||||
|
|
||||||
<hrule/>
|
<button>
|
||||||
|
<row>0</row>
|
||||||
|
<col>4</col>
|
||||||
|
<pref-width>25</pref-width>
|
||||||
|
<pref-height>25</pref-height>
|
||||||
|
<legend>></legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>/sim/current-view/x-offset-m</property>
|
||||||
|
<step>0.01</step>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
<button>
|
||||||
|
<row>0</row>
|
||||||
|
<col>5</col>
|
||||||
|
<pref-width>25</pref-width>
|
||||||
|
<pref-height>25</pref-height>
|
||||||
|
<legend>>></legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>/sim/current-view/x-offset-m</property>
|
||||||
|
<step>0.1</step>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
<text>
|
||||||
|
<row>0</row>
|
||||||
|
<col>6</col>
|
||||||
|
<label>right</label>
|
||||||
|
</text>
|
||||||
|
<button>
|
||||||
|
<row>0</row>
|
||||||
|
<col>7</col>
|
||||||
|
<legend>Reset</legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/sim/current-view/x-offset-m</property>
|
||||||
|
<property>/sim/current-view/config/x-offset-m</property>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
<group>
|
|
||||||
<layout>hbox</layout>
|
|
||||||
|
|
||||||
<group>
|
<text>
|
||||||
<layout>vbox</layout>
|
<row>1</row>
|
||||||
|
<col>0</col>
|
||||||
|
<label>down</label>
|
||||||
|
</text>
|
||||||
|
<button>
|
||||||
|
<row>1</row>
|
||||||
|
<col>1</col>
|
||||||
|
<pref-width>25</pref-width>
|
||||||
|
<pref-height>25</pref-height>
|
||||||
|
<legend><<</legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>/sim/current-view/y-offset-m</property>
|
||||||
|
<step>-0.1</step>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
<button>
|
||||||
|
<row>1</row>
|
||||||
|
<col>2</col>
|
||||||
|
<pref-width>25</pref-width>
|
||||||
|
<pref-height>25</pref-height>
|
||||||
|
<legend><</legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>/sim/current-view/y-offset-m</property>
|
||||||
|
<step>-0.01</step>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
<input>
|
||||||
|
<row>1</row>
|
||||||
|
<col>3</col>
|
||||||
|
<name>offset-y</name>
|
||||||
|
<pref-width>65</pref-width>
|
||||||
|
<label>m </label>
|
||||||
|
<live>true</live>
|
||||||
|
<property>/sim/current-view/y-offset-m</property>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-apply</command>
|
||||||
|
<object-name>offset-y</object-name>
|
||||||
|
</binding>
|
||||||
|
</input>
|
||||||
|
|
||||||
<text><label>Left/Right</label></text>
|
<button>
|
||||||
<dial>
|
<row>1</row>
|
||||||
<wrap>false</wrap>
|
<col>4</col>
|
||||||
<min>-100</min>
|
<pref-width>25</pref-width>
|
||||||
<max>100</max>
|
<pref-height>25</pref-height>
|
||||||
<stretch>true</stretch>
|
<legend>></legend>
|
||||||
<property>/sim/current-view/x-offset-m</property>
|
<binding>
|
||||||
<binding><command>dialog-apply</command></binding>
|
<command>property-adjust</command>
|
||||||
</dial>
|
<property>/sim/current-view/y-offset-m</property>
|
||||||
|
<step>0.01</step>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
<button>
|
||||||
|
<row>1</row>
|
||||||
|
<col>5</col>
|
||||||
|
<pref-width>25</pref-width>
|
||||||
|
<pref-height>25</pref-height>
|
||||||
|
<legend>>></legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>/sim/current-view/y-offset-m</property>
|
||||||
|
<step>0.1</step>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
<text>
|
||||||
|
<row>1</row>
|
||||||
|
<col>6</col>
|
||||||
|
<label>up</label>
|
||||||
|
</text>
|
||||||
|
<button>
|
||||||
|
<row>1</row>
|
||||||
|
<col>7</col>
|
||||||
|
|
||||||
<button>
|
<legend>Reset</legend>
|
||||||
<legend>Zero</legend>
|
<binding>
|
||||||
<binding>
|
<command>property-assign</command>
|
||||||
<command>property-assign</command>
|
<property>/sim/current-view/y-offset-m</property>
|
||||||
<property>/sim/current-view/x-offset-m</property>
|
<property>/sim/current-view/config/y-offset-m</property>
|
||||||
<value>0</value>
|
</binding>
|
||||||
</binding>
|
</button>
|
||||||
</button>
|
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<label>-100.00</label>
|
<row>2</row>
|
||||||
<format>%-0.2f m</format>
|
<col>0</col>
|
||||||
<live>true</live>
|
<label>fwd.</label>
|
||||||
<property>/sim/current-view/x-offset-m</property>
|
</text>
|
||||||
</text>
|
<button>
|
||||||
</group>
|
<row>2</row>
|
||||||
|
<col>1</col>
|
||||||
|
<pref-width>25</pref-width>
|
||||||
|
<pref-height>25</pref-height>
|
||||||
|
<legend><<</legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>/sim/current-view/z-offset-m</property>
|
||||||
|
<step>-0.1</step>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
<button>
|
||||||
|
<row>2</row>
|
||||||
|
<col>2</col>
|
||||||
|
<pref-width>25</pref-width>
|
||||||
|
<pref-height>25</pref-height>
|
||||||
|
<legend><</legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>/sim/current-view/z-offset-m</property>
|
||||||
|
<step>-0.01</step>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
<input>
|
||||||
|
<row>2</row>
|
||||||
|
<col>3</col>
|
||||||
|
<name>offset-z</name>
|
||||||
|
<pref-width>65</pref-width>
|
||||||
|
<label>m</label>
|
||||||
|
<live>true</live>
|
||||||
|
<property>/sim/current-view/z-offset-m</property>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-apply</command>
|
||||||
|
<object-name>offset-z</object-name>
|
||||||
|
</binding>
|
||||||
|
</input>
|
||||||
|
<button>
|
||||||
|
<row>2</row>
|
||||||
|
<col>4</col>
|
||||||
|
<pref-width>25</pref-width>
|
||||||
|
<pref-height>25</pref-height>
|
||||||
|
<legend>></legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>/sim/current-view/z-offset-m</property>
|
||||||
|
<step>0.01</step>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
<button>
|
||||||
|
<row>2</row>
|
||||||
|
<col>5</col>
|
||||||
|
<pref-width>25</pref-width>
|
||||||
|
<pref-height>25</pref-height>
|
||||||
|
<legend>>></legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>/sim/current-view/z-offset-m</property>
|
||||||
|
<step>0.1</step>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
<text>
|
||||||
|
<row>2</row>
|
||||||
|
<col>6</col>
|
||||||
|
<label>back</label>
|
||||||
|
</text>
|
||||||
|
<button>
|
||||||
|
<row>2</row>
|
||||||
|
<col>7</col>
|
||||||
|
<legend>Reset</legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/sim/current-view/z-offset-m</property>
|
||||||
|
<property>/sim/current-view/config/z-offset-m</property>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
</group>
|
||||||
|
|
||||||
<group>
|
<hrule/>
|
||||||
<layout>vbox</layout>
|
|
||||||
|
|
||||||
<text><label>Down/Up</label></text>
|
<group>
|
||||||
<dial>
|
<layout>hbox</layout>
|
||||||
<wrap>false</wrap>
|
<empty><stretch>true</stretch></empty>
|
||||||
<min>-100</min>
|
<button>
|
||||||
<max>100</max>
|
<legend>Close</legend>
|
||||||
<stretch>true</stretch>
|
<equal>true</equal>
|
||||||
<property>/sim/current-view/y-offset-m</property>
|
<default>true</default>
|
||||||
<binding><command>dialog-apply</command></binding>
|
<key>Esc</key>
|
||||||
</dial>
|
<binding><command>dialog-apply</command></binding>
|
||||||
|
<binding><command>dialog-close</command></binding>
|
||||||
<button>
|
</button>
|
||||||
<legend>Zero</legend>
|
<empty><stretch>true</stretch></empty>
|
||||||
<binding>
|
</group>
|
||||||
<command>property-assign</command>
|
|
||||||
<property>/sim/current-view/y-offset-m</property>
|
|
||||||
<value>0</value>
|
|
||||||
</binding>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<text>
|
|
||||||
<label>-100.00</label>
|
|
||||||
<format>%-0.2f m</format>
|
|
||||||
<live>true</live>
|
|
||||||
<property>/sim/current-view/y-offset-m</property>
|
|
||||||
</text>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
<group>
|
|
||||||
<layout>vbox</layout>
|
|
||||||
|
|
||||||
<text><label>Fwd/Back</label></text>
|
|
||||||
<dial>
|
|
||||||
<wrap>false</wrap>
|
|
||||||
<min>-100</min>
|
|
||||||
<max>100</max>
|
|
||||||
<stretch>true</stretch>
|
|
||||||
<property>/sim/current-view/z-offset-m</property>
|
|
||||||
<binding><command>dialog-apply</command></binding>
|
|
||||||
</dial>
|
|
||||||
|
|
||||||
<button>
|
|
||||||
<legend>Zero</legend>
|
|
||||||
<binding>
|
|
||||||
<command>property-assign</command>
|
|
||||||
<property>/sim/current-view/z-offset-m</property>
|
|
||||||
<value>0</value>
|
|
||||||
</binding>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<text>
|
|
||||||
<label>-100.00</label>
|
|
||||||
<format>%-0.2f m</format>
|
|
||||||
<live>true</live>
|
|
||||||
<property>/sim/current-view/z-offset-m</property>
|
|
||||||
</text>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
|
|
||||||
<hrule/>
|
|
||||||
|
|
||||||
<group>
|
|
||||||
<layout>hbox</layout>
|
|
||||||
<empty><stretch>true</stretch></empty>
|
|
||||||
<button>
|
|
||||||
<legend>Close</legend>
|
|
||||||
<equal>true</equal>
|
|
||||||
<default>true</default>
|
|
||||||
<key>Esc</key>
|
|
||||||
<binding><command>dialog-apply</command></binding>
|
|
||||||
<binding><command>dialog-close</command></binding>
|
|
||||||
</button>
|
|
||||||
<empty><stretch>true</stretch></empty>
|
|
||||||
</group>
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
Loading…
Reference in a new issue