| 1 |
<?xml version="1.0"?> |
| 2 |
|
| 3 |
<PropertyList> |
| 4 |
<name>view</name> |
| 5 |
|
| 6 |
<nasal> |
| 7 |
<open> |
| 8 |
|
| 9 |
var group = gui.findElementByName(cmdarg(), "active-views"); |
| 10 |
var ac = getprop("/sim/aircraft"); |
| 11 |
group.removeChildren("checkbox"); |
| 12 |
group.removeChildren("hrule"); |
| 13 |
group.removeChildren("text"); |
| 14 |
|
| 15 |
var t = group.getChild("text", 0, 1); |
| 16 |
t.getNode("label", 1).setValue("Standard Views"); |
| 17 |
t.getNode("halign", 1).setValue("left"); |
| 18 |
|
| 19 |
|
| 20 |
var mode = 0; |
| 21 |
foreach (var v; view.views) { |
| 22 |
var index = v.getIndex(); |
| 23 |
var enabled = v.initNode("enabled", 1, "BOOL"); |
| 24 |
var name = v.getNode("name"); |
| 25 |
if (name != nil) { |
| 26 |
if (index >= 200) { |
| 27 |
if (mode != 2) { |
| 28 |
mode = 2; |
| 29 |
group.getChild("empty", 1, 1).getChild("stretch", 0, 1).setValue(1); |
| 30 |
var t = group.getChild("text", 1, 1); |
| 31 |
t.getNode("label", 1).setValue("Other Views"); |
| 32 |
} |
| 33 |
|
| 34 |
} elsif (index >= 100) { |
| 35 |
aircraft.data.add(enabled); |
| 36 |
if (mode != 1) { |
| 37 |
mode = 1; |
| 38 |
group.getChild("empty", 0, 1).getChild("stretch", 0, 1).setValue(1); |
| 39 |
var t = group.getChild("text", 1, 1); |
| 40 |
t.getNode("label", 1).setValue("\"" ~ ac ~ "\" Specific Views"); |
| 41 |
t.getNode("halign", 1).setValue("left"); |
| 42 |
} |
| 43 |
} |
| 44 |
|
| 45 |
var target = group.getChild("checkbox", index, 1); |
| 46 |
props.copy(group.getNode("checkbox-template"), target); |
| 47 |
var nameValue = name != nil ? name.getValue() : nil; |
| 48 |
target.getNode("label").setValue(nameValue != nil ? nameValue : ("** unnamed view " ~ index ~ " **")); |
| 49 |
target.getNode("property").setValue(enabled.getPath()); |
| 50 |
} |
| 51 |
} |
| 52 |
</open> |
| 53 |
</nasal> |
| 54 |
|
| 55 |
<modal>false</modal> |
| 56 |
<layout>vbox</layout> |
| 57 |
|
| 58 |
<group> |
| 59 |
<layout>hbox</layout> |
| 60 |
|
| 61 |
<text> |
| 62 |
<label>View Options</label> |
| 63 |
</text> |
| 64 |
|
| 65 |
<empty><stretch>1</stretch></empty> |
| 66 |
|
| 67 |
<button> |
| 68 |
<legend>X</legend> |
| 69 |
<key>Esc</key> |
| 70 |
<pref-width>20</pref-width> |
| 71 |
<pref-height>20</pref-height> |
| 72 |
<binding> |
| 73 |
<command>dialog-close</command> |
| 74 |
</binding> |
| 75 |
</button> |
| 76 |
</group> |
| 77 |
|
| 78 |
<hrule/> |
| 79 |
|
| 80 |
<group> |
| 81 |
<layout>hbox</layout> |
| 82 |
|
| 83 |
<group> |
| 84 |
<layout>vbox</layout> |
| 85 |
|
| 86 |
<text> |
| 87 |
<label>Select Active Views</label> |
| 88 |
</text> |
| 89 |
|
| 90 |
<group> |
| 91 |
<layout>vbox</layout> |
| 92 |
<halign>center</halign> |
| 93 |
<name>active-views</name> |
| 94 |
|
| 95 |
<text> |
| 96 |
<halign>left</halign> |
| 97 |
<label>Standard Views</label> |
| 98 |
</text> |
| 99 |
|
| 100 |
<checkbox-template> |
| 101 |
<halign>left</halign> |
| 102 |
<label></label> |
| 103 |
<property></property> |
| 104 |
<binding> |
| 105 |
<command>dialog-apply</command> |
| 106 |
</binding> |
| 107 |
</checkbox-template> |
| 108 |
</group> |
| 109 |
</group> |
| 110 |
|
| 111 |
<vrule/> |
| 112 |
|
| 113 |
<group> |
| 114 |
<layout>vbox</layout> |
| 115 |
<halign>center</halign> |
| 116 |
<valign>top</valign> |
| 117 |
|
| 118 |
<text> |
| 119 |
<label>Display Options</label> |
| 120 |
</text> |
| 121 |
|
| 122 |
<checkbox> |
| 123 |
<halign>left</halign> |
| 124 |
<label>Show frame rate</label> |
| 125 |
<property>/sim/rendering/fps-display</property> |
| 126 |
<binding> |
| 127 |
<command>dialog-apply</command> |
| 128 |
</binding> |
| 129 |
</checkbox> |
| 130 |
|
| 131 |
<checkbox> |
| 132 |
<halign>left</halign> |
| 133 |
<label>Show frame spacing</label> |
| 134 |
<property>/sim/rendering/frame-latency-display</property> |
| 135 |
<binding> |
| 136 |
<command>dialog-apply</command> |
| 137 |
</binding> |
| 138 |
</checkbox> |
| 139 |
|
| 140 |
<checkbox> |
| 141 |
<halign>left</halign> |
| 142 |
<label>Show chat messages</label> |
| 143 |
<property>/sim/multiplay/chat-display</property> |
| 144 |
<binding> |
| 145 |
<command>dialog-apply</command> |
| 146 |
</binding> |
| 147 |
</checkbox> |
| 148 |
|
| 149 |
<group> |
| 150 |
<layout>hbox</layout> |
| 151 |
|
| 152 |
<text> |
| 153 |
<label>Chat and event log position (requires restart):</label> |
| 154 |
</text> |
| 155 |
|
| 156 |
<combo> |
| 157 |
<name>chatlocation</name> |
| 158 |
<property>/sim/gui/chat-box-location</property> |
| 159 |
<value>default</value> |
| 160 |
<value>left</value> |
| 161 |
<binding> |
| 162 |
<command>dialog-apply</command> |
| 163 |
<object-name>chatlocation</object-name> |
| 164 |
</binding> |
| 165 |
</combo> |
| 166 |
|
| 167 |
</group> |
| 168 |
|
| 169 |
<checkbox> |
| 170 |
<halign>left</halign> |
| 171 |
<label>Show popup messages</label> |
| 172 |
|
| 173 |
<property>/sim/view-name-popup</property> |
| 174 |
<binding> |
| 175 |
<command>dialog-apply</command> |
| 176 |
</binding> |
| 177 |
</checkbox> |
| 178 |
|
| 179 |
<checkbox> |
| 180 |
<halign>left</halign> |
| 181 |
<label>Show popup when cycling mouse behaviour</label> |
| 182 |
<property>/sim/mouse/cycle-mode-popup</property> |
| 183 |
<binding> |
| 184 |
<command>dialog-apply</command> |
| 185 |
</binding> |
| 186 |
<enable><property>/sim/view-name-popup</property></enable> |
| 187 |
</checkbox> |
| 188 |
|
| 189 |
<checkbox> |
| 190 |
<halign>left</halign> |
| 191 |
<label>Show tooltips</label> |
| 192 |
<property>/sim/mouse/tooltips-enabled</property> |
| 193 |
<binding> |
| 194 |
<command>dialog-apply</command> |
| 195 |
</binding> |
| 196 |
</checkbox> |
| 197 |
|
| 198 |
<checkbox> |
| 199 |
<halign>left</halign> |
| 200 |
<label>Show tooltip on mouse press</label> |
| 201 |
<property>/sim/mouse/click-shows-tooltip</property> |
| 202 |
<binding> |
| 203 |
<command>dialog-apply</command> |
| 204 |
</binding> |
| 205 |
</checkbox> |
| 206 |
|
| 207 |
<checkbox> |
| 208 |
<halign>left</halign> |
| 209 |
<label>Show 2D panel</label> |
| 210 |
<property>/sim/panel/visibility</property> |
| 211 |
<binding> |
| 212 |
<command>dialog-apply</command> |
| 213 |
</binding> |
| 214 |
</checkbox> |
| 215 |
|
| 216 |
<checkbox> |
| 217 |
<halign>left</halign> |
| 218 |
<label>Hide 2D panel in non-centered view</label> |
| 219 |
<property>/sim/panel/hide-nonzero-heading-offset</property> |
| 220 |
<enable> |
| 221 |
<property>/sim/panel/visibility</property> |
| 222 |
</enable> |
| 223 |
<binding> |
| 224 |
<command>dialog-apply</command> |
| 225 |
</binding> |
| 226 |
</checkbox> |
| 227 |
|
| 228 |
<checkbox> |
| 229 |
<halign>left</halign> |
| 230 |
<label>Hide 2D panel in non-cockpit view</label> |
| 231 |
<property>/sim/panel/hide-nonzero-view</property> |
| 232 |
<enable> |
| 233 |
<property>/sim/panel/visibility</property> |
| 234 |
</enable> |
| 235 |
<binding> |
| 236 |
<command>dialog-apply</command> |
| 237 |
</binding> |
| 238 |
</checkbox> |
| 239 |
|
| 240 |
<checkbox> |
| 241 |
<halign>left</halign> |
| 242 |
<label>Autohide menubar</label> |
| 243 |
<property>/sim/menubar/autovisibility/enabled</property> |
| 244 |
<binding> |
| 245 |
<command>dialog-apply</command> |
| 246 |
</binding> |
| 247 |
</checkbox> |
| 248 |
|
| 249 |
<group> |
| 250 |
<layout>hbox</layout> |
| 251 |
<halign>left</halign> |
| 252 |
<padding>0</padding> |
| 253 |
|
| 254 |
<checkbox> |
| 255 |
<label>Autohide cursor in</label> |
| 256 |
<property>/sim/mouse/hide-cursor</property> |
| 257 |
<binding> |
| 258 |
<command>dialog-apply</command> |
| 259 |
</binding> |
| 260 |
</checkbox> |
| 261 |
|
| 262 |
<input> |
| 263 |
<live>true</live> |
| 264 |
<pref-width>40</pref-width> |
| 265 |
<pref-height>10</pref-height> |
| 266 |
<enable> |
| 267 |
<property>/sim/mouse/hide-cursor</property> |
| 268 |
</enable> |
| 269 |
<property>/sim/mouse/cursor-timeout-sec</property> |
| 270 |
<binding> |
| 271 |
<command>dialog-apply</command> |
| 272 |
</binding> |
| 273 |
</input> |
| 274 |
|
| 275 |
<text> |
| 276 |
<label>sec.</label> |
| 277 |
</text> |
| 278 |
</group> |
| 279 |
|
| 280 |
<checkbox> |
| 281 |
<halign>left</halign> |
| 282 |
<label>Legacy multiplayer view selector</label> |
| 283 |
<property>/sim/menubar/legacy-multiplayer-view-selector/enabled</property> |
| 284 |
<binding> |
| 285 |
<command>dialog-apply</command> |
| 286 |
</binding> |
| 287 |
</checkbox> |
| 288 |
|
| 289 |
<checkbox> |
| 290 |
<halign>left</halign> |
| 291 |
<label>Show Pilot Model</label> |
| 292 |
<property>/sim/rendering/pilot-model/enabled</property> |
| 293 |
<visible> |
| 294 |
<equals> |
| 295 |
<property>/sim/rendering/pilot-model/available</property> |
| 296 |
<value>1</value> |
| 297 |
</equals> |
| 298 |
</visible> |
| 299 |
|
| 300 |
<binding> |
| 301 |
<command>dialog-apply</command> |
| 302 |
</binding> |
| 303 |
</checkbox> |
| 304 |
|
| 305 |
</group> |
| 306 |
|
| 307 |
<vrule/> |
| 308 |
|
| 309 |
<group> |
| 310 |
<layout>vbox</layout> |
| 311 |
<halign>center</halign> |
| 312 |
<valign>top</valign> |
| 313 |
|
| 314 |
<text> |
| 315 |
<label>Marker Pins</label> |
| 316 |
</text> |
| 317 |
|
| 318 |
<checkbox> |
| 319 |
<halign>left</halign> |
| 320 |
<label>Show</label> |
| 321 |
<property>/sim/marker-pins/master</property> |
| 322 |
<binding> |
| 323 |
<command>dialog-apply</command> |
| 324 |
</binding> |
| 325 |
</checkbox> |
| 326 |
|
| 327 |
<hrule/> |
| 328 |
|
| 329 |
<checkbox> |
| 330 |
<halign>left</halign> |
| 331 |
<label>Airports</label> |
| 332 |
<property>/sim/marker-pins/airports</property> |
| 333 |
<binding> |
| 334 |
<command>dialog-apply</command> |
| 335 |
</binding> |
| 336 |
</checkbox> |
| 337 |
|
| 338 |
<checkbox> |
| 339 |
<halign>left</halign> |
| 340 |
<label>Navaids</label> |
| 341 |
<property>/sim/marker-pins/navaids</property> |
| 342 |
<binding> |
| 343 |
<command>dialog-apply</command> |
| 344 |
</binding> |
| 345 |
</checkbox> |
| 346 |
|
| 347 |
<checkbox> |
| 348 |
<halign>left</halign> |
| 349 |
<label>Fixes</label> |
| 350 |
<property>/sim/marker-pins/fixes</property> |
| 351 |
<binding> |
| 352 |
<command>dialog-apply</command> |
| 353 |
</binding> |
| 354 |
</checkbox> |
| 355 |
|
| 356 |
<checkbox> |
| 357 |
<halign>left</halign> |
| 358 |
<label>POI</label> |
| 359 |
<property>/sim/marker-pins/pois</property> |
| 360 |
<binding> |
| 361 |
<command>dialog-apply</command> |
| 362 |
</binding> |
| 363 |
</checkbox> |
| 364 |
|
| 365 |
<hrule/> |
| 366 |
|
| 367 |
<checkbox> |
| 368 |
<halign>left</halign> |
| 369 |
<label>Traffic</label> |
| 370 |
<property>/sim/marker-pins/traffic</property> |
| 371 |
<binding> |
| 372 |
<command>dialog-apply</command> |
| 373 |
</binding> |
| 374 |
</checkbox> |
| 375 |
|
| 376 |
</group> |
| 377 |
|
| 378 |
</group> |
| 379 |
|
| 380 |
<hrule/> |
| 381 |
|
| 382 |
<button> |
| 383 |
<legend>Close</legend> |
| 384 |
<default>true</default> |
| 385 |
<key>Esc</key> |
| 386 |
<binding> |
| 387 |
<command>dialog-apply</command> |
| 388 |
</binding> |
| 389 |
<binding> |
| 390 |
<command>dialog-close</command> |
| 391 |
</binding> |
| 392 |
</button> |
| 393 |
|
| 394 |
</PropertyList> |