| 1 | <?xml version="1.0"?> |
| 2 | |
| 3 | <PropertyList> |
| 4 | <name>pilot_offset</name> |
| 5 | <layout>vbox</layout> |
| 6 | <width>450</width> |
| 7 | <nasal> |
| 8 | <open> |
| 9 | <![CDATA[ |
| 10 | var view_listener = setlistener("sim/current-view/view-number-raw", func(n) { |
| 11 | var x = getprop("sim/view["~int(n.getValue())~"]/config/x-offset-m"); |
| 12 | var y = getprop("sim/view["~int(n.getValue())~"]/config/y-offset-m"); |
| 13 | var z = getprop("sim/view["~int(n.getValue())~"]/config/z-offset-m"); |
| 14 | setprop("sim/current-view/config/x-offset-m", x); |
| 15 | setprop("sim/current-view/config/y-offset-m", y); |
| 16 | setprop("sim/current-view/config/z-offset-m", z); |
| 17 | |
| 18 | },1,0); |
| 19 | ]]> |
| 20 | </open> |
| 21 | <close> |
| 22 | <![CDATA[ |
| 23 | removelistener(view_listener); |
| 24 | props.getNode("sim/current-view/config/x-offset-m").remove(); |
| 25 | props.getNode("sim/current-view/config/y-offset-m").remove(); |
| 26 | props.getNode("sim/current-view/config/z-offset-m").remove(); |
| 27 | ]]> |
| 28 | </close> |
| 29 | </nasal> |
| 30 | |
| 31 | <group> |
| 32 | <layout>hbox</layout> |
| 33 | <text> |
| 34 | <label>Adjust View Position</label> |
| 35 | </text> |
| 36 | <empty><stretch>1</stretch></empty> |
| 37 | <button> |
| 38 | <legend>X</legend> |
| 39 | <key>Esc</key> |
| 40 | <pref-width>20</pref-width> |
| 41 | <pref-height>20</pref-height> |
| 42 | <binding> |
| 43 | <command>dialog-close</command> |
| 44 | </binding> |
| 45 | </button> |
| 46 | </group> |
| 47 | |
| 48 | <hrule/> |
| 49 | |
| 50 | <group> |
| 51 | <layout>table</layout> |
| 52 | <text> |
| 53 | <row>0</row> |
| 54 | <col>0</col> |
| 55 | <label>left</label> |
| 56 | </text> |
| 57 | <button> |
| 58 | <row>0</row> |
| 59 | <col>1</col> |
| 60 | <pref-width>25</pref-width> |
| 61 | <pref-height>25</pref-height> |
| 62 | <legend><<</legend> |
| 63 | <binding> |
| 64 | <command>property-adjust</command> |
| 65 | <property>/sim/current-view/x-offset-m</property> |
| 66 | <step>-0.1</step> |
| 67 | </binding> |
| 68 | </button> |
| 69 | <button> |
| 70 | <row>0</row> |
| 71 | <col>2</col> |
| 72 | <pref-width>25</pref-width> |
| 73 | <pref-height>25</pref-height> |
| 74 | <legend><</legend> |
| 75 | <binding> |
| 76 | <command>property-adjust</command> |
| 77 | <property>/sim/current-view/x-offset-m</property> |
| 78 | <step>-0.01</step> |
| 79 | </binding> |
| 80 | </button> |
| 81 | <input> |
| 82 | <row>0</row> |
| 83 | <col>3</col> |
| 84 | <name>offset-x</name> |
| 85 | <pref-width>65</pref-width> |
| 86 | <label>m</label> |
| 87 | <live>true</live> |
| 88 | <property>/sim/current-view/x-offset-m</property> |
| 89 | <binding> |
| 90 | <command>dialog-apply</command> |
| 91 | <object-name>offset-x</object-name> |
| 92 | </binding> |
| 93 | </input> |
| 94 | |
| 95 | <button> |
| 96 | <row>0</row> |
| 97 | <col>4</col> |
| 98 | <pref-width>25</pref-width> |
| 99 | <pref-height>25</pref-height> |
| 100 | <legend>></legend> |
| 101 | <binding> |
| 102 | <command>property-adjust</command> |
| 103 | <property>/sim/current-view/x-offset-m</property> |
| 104 | <step>0.01</step> |
| 105 | </binding> |
| 106 | </button> |
| 107 | <button> |
| 108 | <row>0</row> |
| 109 | <col>5</col> |
| 110 | <pref-width>25</pref-width> |
| 111 | <pref-height>25</pref-height> |
| 112 | <legend>>></legend> |
| 113 | <binding> |
| 114 | <command>property-adjust</command> |
| 115 | <property>/sim/current-view/x-offset-m</property> |
| 116 | <step>0.1</step> |
| 117 | </binding> |
| 118 | </button> |
| 119 | <text> |
| 120 | <row>0</row> |
| 121 | <col>6</col> |
| 122 | <label>right</label> |
| 123 | </text> |
| 124 | <button> |
| 125 | <row>0</row> |
| 126 | <col>7</col> |
| 127 | <legend>Reset</legend> |
| 128 | <binding> |
| 129 | <command>property-assign</command> |
| 130 | <property>/sim/current-view/x-offset-m</property> |
| 131 | <property>/sim/current-view/config/x-offset-m</property> |
| 132 | </binding> |
| 133 | </button> |
| 134 | |
| 135 | |
| 136 | <text> |
| 137 | <row>1</row> |
| 138 | <col>0</col> |
| 139 | <label>down</label> |
| 140 | </text> |
| 141 | <button> |
| 142 | <row>1</row> |
| 143 | <col>1</col> |
| 144 | <pref-width>25</pref-width> |
| 145 | <pref-height>25</pref-height> |
| 146 | <legend><<</legend> |
| 147 | <binding> |
| 148 | <command>property-adjust</command> |
| 149 | <property>/sim/current-view/y-offset-m</property> |
| 150 | <step>-0.1</step> |
| 151 | </binding> |
| 152 | </button> |
| 153 | <button> |
| 154 | <row>1</row> |
| 155 | <col>2</col> |
| 156 | <pref-width>25</pref-width> |
| 157 | <pref-height>25</pref-height> |
| 158 | <legend><</legend> |
| 159 | <binding> |
| 160 | <command>property-adjust</command> |
| 161 | <property>/sim/current-view/y-offset-m</property> |
| 162 | <step>-0.01</step> |
| 163 | </binding> |
| 164 | </button> |
| 165 | <input> |
| 166 | <row>1</row> |
| 167 | <col>3</col> |
| 168 | <name>offset-y</name> |
| 169 | <pref-width>65</pref-width> |
| 170 | <label>m </label> |
| 171 | <live>true</live> |
| 172 | <property>/sim/current-view/y-offset-m</property> |
| 173 | <binding> |
| 174 | <command>dialog-apply</command> |
| 175 | <object-name>offset-y</object-name> |
| 176 | </binding> |
| 177 | </input> |
| 178 | |
| 179 | <button> |
| 180 | <row>1</row> |
| 181 | <col>4</col> |
| 182 | <pref-width>25</pref-width> |
| 183 | <pref-height>25</pref-height> |
| 184 | <legend>></legend> |
| 185 | <binding> |
| 186 | <command>property-adjust</command> |
| 187 | <property>/sim/current-view/y-offset-m</property> |
| 188 | <step>0.01</step> |
| 189 | </binding> |
| 190 | </button> |
| 191 | <button> |
| 192 | <row>1</row> |
| 193 | <col>5</col> |
| 194 | <pref-width>25</pref-width> |
| 195 | <pref-height>25</pref-height> |
| 196 | <legend>>></legend> |
| 197 | <binding> |
| 198 | <command>property-adjust</command> |
| 199 | <property>/sim/current-view/y-offset-m</property> |
| 200 | <step>0.1</step> |
| 201 | </binding> |
| 202 | </button> |
| 203 | <text> |
| 204 | <row>1</row> |
| 205 | <col>6</col> |
| 206 | <label>up</label> |
| 207 | </text> |
| 208 | <button> |
| 209 | <row>1</row> |
| 210 | <col>7</col> |
| 211 | |
| 212 | <legend>Reset</legend> |
| 213 | <binding> |
| 214 | <command>property-assign</command> |
| 215 | <property>/sim/current-view/y-offset-m</property> |
| 216 | <property>/sim/current-view/config/y-offset-m</property> |
| 217 | </binding> |
| 218 | </button> |
| 219 | |
| 220 | <text> |
| 221 | <row>2</row> |
| 222 | <col>0</col> |
| 223 | <label>fwd.</label> |
| 224 | </text> |
| 225 | <button> |
| 226 | <row>2</row> |
| 227 | <col>1</col> |
| 228 | <pref-width>25</pref-width> |
| 229 | <pref-height>25</pref-height> |
| 230 | <legend><<</legend> |
| 231 | <binding> |
| 232 | <command>property-adjust</command> |
| 233 | <property>/sim/current-view/z-offset-m</property> |
| 234 | <step>-0.1</step> |
| 235 | </binding> |
| 236 | </button> |
| 237 | <button> |
| 238 | <row>2</row> |
| 239 | <col>2</col> |
| 240 | <pref-width>25</pref-width> |
| 241 | <pref-height>25</pref-height> |
| 242 | <legend><</legend> |
| 243 | <binding> |
| 244 | <command>property-adjust</command> |
| 245 | <property>/sim/current-view/z-offset-m</property> |
| 246 | <step>-0.01</step> |
| 247 | </binding> |
| 248 | </button> |
| 249 | <input> |
| 250 | <row>2</row> |
| 251 | <col>3</col> |
| 252 | <name>offset-z</name> |
| 253 | <pref-width>65</pref-width> |
| 254 | <label>m</label> |
| 255 | <live>true</live> |
| 256 | <property>/sim/current-view/z-offset-m</property> |
| 257 | <binding> |
| 258 | <command>dialog-apply</command> |
| 259 | <object-name>offset-z</object-name> |
| 260 | </binding> |
| 261 | </input> |
| 262 | <button> |
| 263 | <row>2</row> |
| 264 | <col>4</col> |
| 265 | <pref-width>25</pref-width> |
| 266 | <pref-height>25</pref-height> |
| 267 | <legend>></legend> |
| 268 | <binding> |
| 269 | <command>property-adjust</command> |
| 270 | <property>/sim/current-view/z-offset-m</property> |
| 271 | <step>0.01</step> |
| 272 | </binding> |
| 273 | </button> |
| 274 | <button> |
| 275 | <row>2</row> |
| 276 | <col>5</col> |
| 277 | <pref-width>25</pref-width> |
| 278 | <pref-height>25</pref-height> |
| 279 | <legend>>></legend> |
| 280 | <binding> |
| 281 | <command>property-adjust</command> |
| 282 | <property>/sim/current-view/z-offset-m</property> |
| 283 | <step>0.1</step> |
| 284 | </binding> |
| 285 | </button> |
| 286 | <text> |
| 287 | <row>2</row> |
| 288 | <col>6</col> |
| 289 | <label>back</label> |
| 290 | </text> |
| 291 | <button> |
| 292 | <row>2</row> |
| 293 | <col>7</col> |
| 294 | <legend>Reset</legend> |
| 295 | <binding> |
| 296 | <command>property-assign</command> |
| 297 | <property>/sim/current-view/z-offset-m</property> |
| 298 | <property>/sim/current-view/config/z-offset-m</property> |
| 299 | </binding> |
| 300 | </button> |
| 301 | </group> |
| 302 | |
| 303 | <hrule/> |
| 304 | |
| 305 | <group> |
| 306 | <layout>hbox</layout> |
| 307 | <empty><stretch>true</stretch></empty> |
| 308 | <button> |
| 309 | <legend>Close</legend> |
| 310 | <equal>true</equal> |
| 311 | <default>true</default> |
| 312 | <key>Esc</key> |
| 313 | <binding><command>dialog-apply</command></binding> |
| 314 | <binding><command>dialog-close</command></binding> |
| 315 | </button> |
| 316 | <empty><stretch>true</stretch></empty> |
| 317 | </group> |
| 318 | </PropertyList> |