Debian Codegraph @

gui/dialogs/button-config.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <PropertyList>
4 <nasal>
5 <open><![CDATA[
6
7 var assignButton = func(cmd) {
8
9 var i = getprop("/sim/gui/dialogs/joystick-config/current-button");
10 setprop("/sim/gui/dialogs/joystick-config/button[" ~ i ~ "]/binding", cmd);
11
12 joystick.writeConfig();
13 fgcommand("reinit", props.Node.new({"subsystem": "input"}));
14 fgcommand("dialog-close", props.Node.new({"dialog-name": "button-config"}));
15 fgcommand("dialog-close", props.Node.new({"dialog-name": "joystick-config"}));
16 fgcommand("dialog-show", props.Node.new({"dialog-name": "joystick-config"}));
17 }
18 ]]></open>
19
20 <close><![CDATA[
21 ]]></close>
22 </nasal>
23
24
25 <!-- To be implemented
26 tiller axis
27 counter-measures
28 masterarm toggle
29 radar standby toggle
30 radar slew target selector
31 radar select target.
32 -->
33
34 <name>button-config</name>
35 <layout>vbox</layout>
36 <resizable>true</resizable>
37 <modal>true</modal>
38 <default-padding>3</default-padding>
39
40 <group>
41 <layout>hbox</layout>
42 <default-padding>1</default-padding>
43
44 <text>
45 <label>Button Configuration</label>
46 </text>
47
48 <empty><stretch>true</stretch></empty>
49
50 <button>
51 <legend>X</legend>
52 <key>Esc</key>
53 <pref-width>20</pref-width>
54 <pref-height>20</pref-height>
55 <binding>
56 <command>dialog-close</command>
57 </binding>
58 </button>
59 </group>
60
61 <hrule/>
62
63 <text>
64 <halign>left</halign>
65 <label>Select the command you wish to assign to this button.</label>
66 </text>
67
68 <hrule/>
69
70 <group>
71 <layout>table</layout>
72
73 <text>
74 <row>0</row>
75 <col>0</col>
76 <label>Flight Surface Trim</label>
77 </text>
78
79 <button>
80 <row>1</row>
81 <col>0</col>
82 <halign>fill</halign>
83 <legend>Elevator Trim Up</legend>
84 <binding>
85 <command>nasal</command>
86 <script>
87 assignButton("Elevator Trim Up");
88 </script>
89 </binding>
90 </button>
91
92 <button>
93 <row>2</row>
94 <col>0</col>
95 <halign>fill</halign>
96 <legend>Elevator Trim Down</legend>
97 <binding>
98 <command>nasal</command>
99 <script>
100 assignButton("Elevator Trim Down");
101 </script>
102 </binding>
103 </button>
104
105 <button>
106 <row>3</row>
107 <col>0</col>
108 <halign>fill</halign>
109 <legend>Elevator Trim Pos</legend>
110 <binding>
111 <command>nasal</command>
112 <script>
113 assignButton("Elevator Trim Pos");
114 </script>
115 </binding>
116 </button>
117
118 <button>
119 <row>4</row>
120 <col>0</col>
121 <halign>fill</halign>
122 <legend>Rudder Trim Left</legend>
123 <binding>
124 <command>nasal</command>
125 <script>
126 assignButton("Rudder Trim Left");
127 </script>
128 </binding>
129 </button>
130
131 <button>
132 <row>5</row>
133 <col>0</col>
134 <halign>fill</halign>
135 <legend>Rudder Trim Right</legend>
136 <binding>
137 <command>nasal</command>
138 <script>
139 assignButton("Rudder Trim Right");
140 </script>
141 </binding>
142 </button>
143
144 <button>
145 <row>6</row>
146 <col>0</col>
147 <halign>fill</halign>
148 <legend>Rudder Trim Pos</legend>
149 <binding>
150 <command>nasal</command>
151 <script>
152 assignButton("Rudder Trim Pos");
153 </script>
154 </binding>
155 </button>
156
157 <button>
158 <row>7</row>
159 <col>0</col>
160 <halign>fill</halign>
161 <legend>Aileron Trim Left</legend>
162 <binding>
163 <command>nasal</command>
164 <script>
165 assignButton("Aileron Trim Left");
166 </script>
167 </binding>
168 </button>
169
170 <button>
171 <row>8</row>
172 <col>0</col>
173 <halign>fill</halign>
174 <legend>Aileron Trim Right</legend>
175 <binding>
176 <command>nasal</command>
177 <script>
178 assignButton("Aileron Trim Right");
179 </script>
180 </binding>
181 </button>
182
183 <button>
184 <row>9</row>
185 <col>0</col>
186 <halign>fill</halign>
187 <legend>Aileron Trim Pos</legend>
188 <binding>
189 <command>nasal</command>
190 <script>
191 assignButton("Aileron Trim Pos");
192 </script>
193 </binding>
194 </button>
195
196 <button>
197 <row>10</row>
198 <col>0</col>
199 <halign>fill</halign>
200 <legend>Trim to Positions</legend>
201 <binding>
202 <command>nasal</command>
203 <script>
204 assignButton("Trim to Positions");
205 </script>
206 </binding>
207 </button>
208
209 <text>
210 <row>0</row>
211 <col>1</col>
212 <label>Control Surfaces</label>
213 </text>
214
215 <button>
216 <row>1</row>
217 <col>1</col>
218 <halign>fill</halign>
219 <legend>Flaps Up</legend>
220 <binding>
221 <command>nasal</command>
222 <script>
223 assignButton("Flaps Up");
224 </script>
225 </binding>
226 </button>
227
228 <button>
229 <row>2</row>
230 <col>1</col>
231 <halign>fill</halign>
232 <legend>Flaps Down</legend>
233 <binding>
234 <command>nasal</command>
235 <script>
236 assignButton("Flaps Down");
237 </script>
238 </binding>
239 </button>
240
241 <button>
242 <row>3</row>
243 <col>1</col>
244 <halign>fill</halign>
245 <legend>Gear Up</legend>
246 <binding>
247 <command>nasal</command>
248 <script>
249 assignButton("Gear Up");
250 </script>
251 </binding>
252 </button>
253
254 <button>
255 <row>4</row>
256 <col>1</col>
257 <halign>fill</halign>
258 <legend>Gear Down</legend>
259 <binding>
260 <command>nasal</command>
261 <script>
262 assignButton("Gear Down");
263 </script>
264 </binding>
265 </button>
266 <button>
267 <row>5</row>
268 <col>1</col>
269 <halign>fill</halign>
270 <legend>Gear Toggle</legend>
271 <binding>
272 <command>nasal</command>
273 <script>
274 assignButton("Gear Toggle");
275 </script>
276 </binding>
277 </button>
278
279
280 <button>
281 <row>6</row>
282 <col>1</col>
283 <halign>fill</halign>
284 <legend>Spoilers Retract</legend>
285 <binding>
286 <command>nasal</command>
287 <script>
288 assignButton("Spoilers Retract");
289 </script>
290 </binding>
291 </button>
292
293 <button>
294 <row>7</row>
295 <col>1</col>
296 <halign>fill</halign>
297 <legend>Spoilers Deploy</legend>
298 <binding>
299 <command>nasal</command>
300 <script>
301 assignButton("Spoilers Deploy");
302 </script>
303 </binding>
304 </button>
305
306 <text>
307 <row>0</row>
308 <col>2</col>
309 <label>Powerplant Controls</label>
310 </text>
311
312 <button>
313 <row>1</row>
314 <col>2</col>
315 <halign>fill</halign>
316 <legend>Throttle Up</legend>
317 <binding>
318 <command>nasal</command>
319 <script>
320 assignButton("Throttle Up");
321 </script>
322 </binding>
323 </button>
324
325 <button>
326 <row>2</row>
327 <col>2</col>
328 <halign>fill</halign>
329 <legend>Throttle Down</legend>
330 <binding>
331 <command>nasal</command>
332 <script>
333 assignButton("Throttle Down");
334 </script>
335 </binding>
336 </button>
337
338 <button>
339 <row>3</row>
340 <col>2</col>
341 <halign>fill</halign>
342 <legend>Mixture Rich</legend>
343 <binding>
344 <command>nasal</command>
345 <script>
346 assignButton("Mixture Rich");
347 </script>
348 </binding>
349 </button>
350
351 <button>
352 <row>4</row>
353 <col>2</col>
354 <halign>fill</halign>
355 <legend>Mixture Lean</legend>
356 <binding>
357 <command>nasal</command>
358 <script>
359 assignButton("Mixture Lean");
360 </script>
361 </binding>
362 </button>
363
364 <button>
365 <row>5</row>
366 <col>2</col>
367 <halign>fill</halign>
368 <legend>Propeller Fine</legend>
369 <binding>
370 <command>nasal</command>
371 <script>
372 assignButton("Propeller Fine");
373 </script>
374 </binding>
375 </button>
376
377 <button>
378 <row>6</row>
379 <col>2</col>
380 <halign>fill</halign>
381 <legend>Propeller Coarse</legend>
382 <binding>
383 <command>nasal</command>
384 <script>
385 assignButton("Propeller Coarse");
386 </script>
387 </binding>
388 </button>
389 <button>
390 <row>7</row>
391 <col>2</col>
392 <halign>fill</halign>
393 <legend>All Reverser Toggle</legend>
394 <binding>
395 <command>nasal</command>
396 <script>
397 assignButton("Reverser Toggle");
398 </script>
399 </binding>
400 </button>
401
402 <text>
403 <row>0</row>
404 <col>3</col>
405 <label>Other Aircraft Controls</label>
406 </text>
407
408 <button>
409 <row>1</row>
410 <col>3</col>
411 <halign>fill</halign>
412 <legend>Brakes</legend>
413 <binding>
414 <command>nasal</command>
415 <script>
416 assignButton("Brakes");
417 </script>
418 </binding>
419 </button>
420
421 <button>
422 <row>2</row>
423 <col>3</col>
424 <halign>fill</halign>
425 <legend>Auto air/ground brakes</legend>
426 <binding>
427 <command>nasal</command>
428 <script>
429 assignButton("Brakes (air/wheel)");
430 </script>
431 </binding>
432 </button>
433
434 <button>
435 <row>3</row>
436 <col>3</col>
437 <halign>fill</halign>
438 <legend>Brakes (air/wheel)</legend>
439 <binding>
440 <command>nasal</command>
441 <script>
442 assignButton("Brakes (air/wheel)");
443 </script>
444 </binding>
445 </button>
446
447 <button>
448 <row>4</row>
449 <col>3</col>
450 <halign>fill</halign>
451 <legend>Parking brakes</legend>
452 <binding>
453 <command>nasal</command>
454 <script>
455 assignButton("Parking brakes");
456 </script>
457 </binding>
458 </button>
459
460 <button>
461 <row>5</row>
462 <col>3</col>
463 <halign>fill</halign>
464 <legend>FGCom PTT(1)</legend>
465 <binding>
466 <command>nasal</command>
467 <script>
468 assignButton("FGCom PTT");
469 </script>
470 </binding>
471 </button>
472
473 <button>
474 <row>6</row>
475 <col>3</col>
476 <halign>fill</halign>
477 <legend>FGCom PTT(2)</legend>
478 <binding>
479 <command>nasal</command>
480 <script>
481 assignButton("FGCom PTT(2)");
482 </script>
483 </binding>
484 </button>
485
486 <button>
487 <row>7</row>
488 <col>3</col>
489 <halign>fill</halign>
490 <legend>Trigger</legend>
491 <binding>
492 <command>nasal</command>
493 <script>
494 assignButton("Trigger");
495 </script>
496 </binding>
497 </button>
498
499 <button>
500 <row>8</row>
501 <col>3</col>
502 <halign>fill</halign>
503 <legend>Custom</legend>
504 <binding>
505 <command>nasal</command>
506 <script>
507 assignButton("Custom");
508 </script>
509 </binding>
510 </button>
511
512 <button>
513 <row>9</row>
514 <col>3</col>
515 <halign>fill</halign>
516 <legend>NWS toggle</legend>
517 <binding>
518 <command>nasal</command>
519 <script>
520 assignButton("NWS toggle");
521 </script>
522 </binding>
523 </button>
524
525 <button>
526 <row>10</row>
527 <col>3</col>
528 <halign>fill</halign>
529 <legend>Autopilot disconnect</legend>
530 <binding>
531 <command>nasal</command>
532 <script>
533 assignButton("Autopilot disconnect");
534 </script>
535 </binding>
536 </button>
537
538 <text>
539 <row>0</row>
540 <col>4</col>
541 <label>Simulator Controls</label>
542 </text>
543
544 <button>
545 <row>1</row>
546 <col>4</col>
547 <halign>fill</halign>
548 <legend>View Decrease</legend>
549 <binding>
550 <command>nasal</command>
551 <script>
552 assignButton("View Decrease");
553 </script>
554 </binding>
555 </button>
556
557 <button>
558 <row>2</row>
559 <col>4</col>
560 <halign>fill</halign>
561 <legend>View Increase</legend>
562 <binding>
563 <command>nasal</command>
564 <script>
565 assignButton("View Increase");
566 </script>
567 </binding>
568 </button>
569
570 <button>
571 <row>3</row>
572 <col>4</col>
573 <halign>fill</halign>
574 <legend>View Cycle Forwards</legend>
575 <binding>
576 <command>nasal</command>
577 <script>
578 assignButton("View Cycle Forwards");
579 </script>
580 </binding>
581 </button>
582
583 <button>
584 <row>4</row>
585 <col>4</col>
586 <halign>fill</halign>
587 <legend>View Cycle Backwards</legend>
588 <binding>
589 <command>nasal</command>
590 <script>
591 assignButton("View Cycle Backwards");
592 </script>
593 </binding>
594 </button>
595
596 <button>
597 <row>5</row>
598 <col>4</col>
599 <halign>fill</halign>
600 <legend>View Left</legend>
601 <binding>
602 <command>nasal</command>
603 <script>
604 assignButton("View Left");
605 </script>
606 </binding>
607 </button>
608
609 <button>
610 <row>6</row>
611 <col>4</col>
612 <halign>fill</halign>
613 <legend>View Right</legend>
614 <binding>
615 <command>nasal</command>
616 <script>
617 assignButton("View Right");
618 </script>
619 </binding>
620 </button>
621
622 <button>
623 <row>7</row>
624 <col>4</col>
625 <halign>fill</halign>
626 <legend>View Up</legend>
627 <binding>
628 <command>nasal</command>
629 <script>
630 assignButton("View Up");
631 </script>
632 </binding>
633 </button>
634
635 <button>
636 <row>8</row>
637 <col>4</col>
638 <halign>fill</halign>
639 <legend>View Down</legend>
640 <binding>
641 <command>nasal</command>
642 <script>
643 assignButton("View Down");
644 </script>
645 </binding>
646 </button>
647 <button>
648 <row>9</row>
649 <col>4</col>
650 <halign>fill</halign>
651 <legend>Total Freeze</legend>
652 <binding>
653 <command>nasal</command>
654 <script>
655 assignButton("Total Freeze");
656 </script>
657 </binding>
658 </button>
659
660 <text>
661 <row>0</row>
662 <col>5</col>
663 <label>Military</label>
664 </text>
665
666
667 <button>
668 <row>1</row>
669 <col>5</col>
670 <halign>fill</halign>
671 <legend>Trigger</legend>
672 <binding>
673 <command>nasal</command>
674 <script>
675 assignButton("Trigger");
676 </script>
677 </binding>
678 </button>
679 <button>
680 <row>2</row>
681 <col>5</col>
682 <halign>fill</halign>
683 <legend>Pickle</legend>
684 <binding>
685 <command>nasal</command>
686 <script>
687 assignButton("Pickle");
688 </script>
689 </binding>
690 </button>
691 <button>
692 <row>3</row>
693 <col>5</col>
694 <halign>fill</halign>
695 <legend>Target next</legend>
696 <binding>
697 <command>nasal</command>
698 <script>
699 assignButton("Target next");
700 </script>
701 </binding>
702 </button>
703 <button>
704 <row>4</row>
705 <col>5</col>
706 <halign>fill</halign>
707 <legend>Target previous</legend>
708 <binding>
709 <command>nasal</command>
710 <script>
711 assignButton("Target previous");
712 </script>
713 </binding>
714 </button>
715 <button>
716 <row>5</row>
717 <col>5</col>
718 <halign>fill</halign>
719 <legend>Weapon next</legend>
720 <binding>
721 <command>nasal</command>
722 <script>
723 assignButton("Weapon next");
724 </script>
725 </binding>
726 </button>
727 <button>
728 <row>6</row>
729 <col>5</col>
730 <halign>fill</halign>
731 <legend>Weapon previous</legend>
732 <binding>
733 <command>nasal</command>
734 <script>
735 assignButton("Weapon previous");
736 </script>
737 </binding>
738 </button>
739 <button>
740 <row>7</row>
741 <col>5</col>
742 <halign>fill</halign>
743 <legend>Azimuth left</legend>
744 <binding>
745 <command>nasal</command>
746 <script>
747 assignButton("Azimuth left");
748 </script>
749 </binding>
750 </button>
751 <button>
752 <row>8</row>
753 <col>5</col>
754 <halign>fill</halign>
755 <legend>Azimuth right</legend>
756 <binding>
757 <command>nasal</command>
758 <script>
759 assignButton("Azimuth right");
760 </script>
761 </binding>
762 </button>
763 <button>
764 <row>9</row>
765 <col>5</col>
766 <halign>fill</halign>
767 <legend>Elevation up</legend>
768 <binding>
769 <command>nasal</command>
770 <script>
771 assignButton("Elevation up");
772 </script>
773 </binding>
774 </button>
775 <button>
776 <row>10</row>
777 <col>5</col>
778 <halign>fill</halign>
779 <legend>Elevation down</legend>
780 <binding>
781 <command>nasal</command>
782 <script>
783 assignButton("Elevation down");
784 </script>
785 </binding>
786 </button>
787 <button>
788 <row>11</row>
789 <col>5</col>
790 <halign>fill</halign>
791 <legend>Missile Reject</legend>
792 <binding>
793 <command>nasal</command>
794 <script>
795 assignButton("Missile Reject");
796 </script>
797 </binding>
798 </button>
799 </group>
800
801 <group>
802 <empty>
803 <stretch>true</stretch>
804 </empty>
805 <layout>hbox</layout>
806
807 <button>
808 <legend>Remove assignment</legend>
809 <binding>
810 <command>nasal</command>
811 <script>
812 assignButton("None");
813 </script>
814 </binding>
815 </button>
816
817 <button>
818 <legend>Close</legend>
819 <default>true</default>
820 <key>Esc</key>
821 <binding>
822 <command>dialog-close</command>
823 </binding>
824 </button>
825 <empty>
826 <stretch>true</stretch>
827 </empty>
828 </group>
829
830 </PropertyList>