1
0
Fork 0

Sim: Add toggle keyboard buttons to MCDU dialogs

This commit is contained in:
Josh Davidson 2020-04-20 18:24:22 -04:00
parent 0462960737
commit 20f159d28e
2 changed files with 30 additions and 4 deletions

View file

@ -17,6 +17,18 @@
<halign>left</halign>
<label>Left MCDU</label>
</text>
<button>
<halign>right</halign>
<pref-width>220</pref-width>
<pref-height>20</pref-height>
<legend>Toggle Keyboard Input</legend>
<live>true</live>
<property>/FMGC/keyboard-left</property>
<binding>
<command>property-toggle</command>
<property>/FMGC/keyboard-left</property>
</binding>
</button>
<button>
<halign>right</halign>
<pref-width>20</pref-width>
@ -24,8 +36,9 @@
<legend>X</legend>
<key>Esc</key>
<binding>
<command>nasal</command>
<script>setprop("FMGC/keyboard-left", 0);</script>
<command>property-assign</command>
<property>/FMGC/keyboard-left</property>
<value>0</value>
</binding>
<binding>
<command>dialog-close</command>

View file

@ -17,6 +17,18 @@
<halign>left</halign>
<label>Right MCDU</label>
</text>
<button>
<halign>right</halign>
<pref-width>220</pref-width>
<pref-height>20</pref-height>
<legend>Toggle Keyboard Input</legend>
<live>true</live>
<property>/FMGC/keyboard-right</property>
<binding>
<command>property-toggle</command>
<property>/FMGC/keyboard-right</property>
</binding>
</button>
<button>
<halign>right</halign>
<pref-width>20</pref-width>
@ -24,8 +36,9 @@
<legend>X</legend>
<key>Esc</key>
<binding>
<command>nasal</command>
<script>setprop("FMGC/keyboard-right", 0);</script>
<command>property-assign</command>
<property>/FMGC/keyboard-right</property>
<value>0</value>
</binding>
<binding>
<command>dialog-close</command>