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
|
@ -3,17 +3,38 @@
|
||||||
<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);
|
||||||
|
|
||||||
|
},1,0);
|
||||||
|
]]>
|
||||||
|
</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>
|
||||||
|
|
||||||
<group>
|
<group>
|
||||||
<layout>hbox</layout>
|
<layout>hbox</layout>
|
||||||
<empty><stretch>1</stretch></empty>
|
<empty><stretch>1</stretch></empty>
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<label>Adjust View Position</label>
|
<label>Adjust View Position</label>
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
<empty><stretch>1</stretch></empty>
|
<empty><stretch>1</stretch></empty>
|
||||||
|
|
||||||
<button>
|
<button>
|
||||||
<pref-width>16</pref-width>
|
<pref-width>16</pref-width>
|
||||||
<pref-height>16</pref-height>
|
<pref-height>16</pref-height>
|
||||||
|
@ -29,97 +50,256 @@
|
||||||
<hrule/>
|
<hrule/>
|
||||||
|
|
||||||
<group>
|
<group>
|
||||||
<layout>hbox</layout>
|
<layout>table</layout>
|
||||||
|
<text>
|
||||||
<group>
|
<row>0</row>
|
||||||
<layout>vbox</layout>
|
<col>0</col>
|
||||||
|
<label>left</label>
|
||||||
<text><label>Left/Right</label></text>
|
</text>
|
||||||
<dial>
|
<button>
|
||||||
<wrap>false</wrap>
|
<row>0</row>
|
||||||
<min>-100</min>
|
<col>1</col>
|
||||||
<max>100</max>
|
<pref-width>25</pref-width>
|
||||||
<stretch>true</stretch>
|
<pref-height>25</pref-height>
|
||||||
|
<legend><<</legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
<property>/sim/current-view/x-offset-m</property>
|
<property>/sim/current-view/x-offset-m</property>
|
||||||
<binding><command>dialog-apply</command></binding>
|
<step>-0.1</step>
|
||||||
</dial>
|
</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>
|
||||||
|
|
||||||
<button>
|
<button>
|
||||||
<legend>Zero</legend>
|
<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>
|
<binding>
|
||||||
<command>property-assign</command>
|
<command>property-assign</command>
|
||||||
<property>/sim/current-view/x-offset-m</property>
|
<property>/sim/current-view/x-offset-m</property>
|
||||||
<value>0</value>
|
<property>/sim/current-view/config/x-offset-m</property>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<button>
|
||||||
|
<row>1</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/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>
|
||||||
|
|
||||||
|
<legend>Reset</legend>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>/sim/current-view/y-offset-m</property>
|
||||||
|
<property>/sim/current-view/config/y-offset-m</property>
|
||||||
</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>
|
||||||
</group>
|
|
||||||
|
|
||||||
<group>
|
|
||||||
<layout>vbox</layout>
|
|
||||||
|
|
||||||
<text><label>Down/Up</label></text>
|
|
||||||
<dial>
|
|
||||||
<wrap>false</wrap>
|
|
||||||
<min>-100</min>
|
|
||||||
<max>100</max>
|
|
||||||
<stretch>true</stretch>
|
|
||||||
<property>/sim/current-view/y-offset-m</property>
|
|
||||||
<binding><command>dialog-apply</command></binding>
|
|
||||||
</dial>
|
|
||||||
|
|
||||||
<button>
|
<button>
|
||||||
<legend>Zero</legend>
|
<row>2</row>
|
||||||
|
<col>1</col>
|
||||||
|
<pref-width>25</pref-width>
|
||||||
|
<pref-height>25</pref-height>
|
||||||
|
<legend><<</legend>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-assign</command>
|
<command>property-adjust</command>
|
||||||
<property>/sim/current-view/y-offset-m</property>
|
<property>/sim/current-view/z-offset-m</property>
|
||||||
<value>0</value>
|
<step>-0.1</step>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</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>
|
<button>
|
||||||
<legend>Zero</legend>
|
<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>
|
<binding>
|
||||||
<command>property-assign</command>
|
<command>property-assign</command>
|
||||||
<property>/sim/current-view/z-offset-m</property>
|
<property>/sim/current-view/z-offset-m</property>
|
||||||
<value>0</value>
|
<property>/sim/current-view/config/z-offset-m</property>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</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>
|
</group>
|
||||||
|
|
||||||
<hrule/>
|
<hrule/>
|
||||||
|
|
Loading…
Reference in a new issue