1
0
Fork 0

Keyboard mode now based on dialog visibility, add support for cap-lock/shift, implrment independent MCDU text entry

This commit is contained in:
Matthew Maring 2020-04-02 14:01:13 -04:00
parent 7cbba48fbc
commit cfcea38a1e
5 changed files with 1145 additions and 150 deletions

File diff suppressed because it is too large Load diff

View file

@ -32,7 +32,8 @@ setprop("MCDUC/colors/mag/g", 0.3333);
setprop("MCDUC/colors/mag/b", 0.7541);
# Fetch nodes:
var mcdu_keyboard_entry = props.globals.getNode("MCDU/keyboard-entry", 1);
var mcdu_keyboard_left = props.globals.getNode("FMGC/keyboard-left", 0);
var mcdu_keyboard_right = props.globals.getNode("FMGC/keyboard-right", 0);
#ACCONFIG
var ac1 = props.globals.getNode("systems/electrical/bus/ac-1", 1);
@ -2738,12 +2739,14 @@ setlistener("sim/signals/fdm-initialized", func {
var MCDU_update = maketimer(0.125, func {
canvas_MCDU_base.update();
});
var showMCDU1 = func {
setprop("FMGC/keyboard-left", 1);
gui.showDialog("mcdu1");
}
var showMCDU2 = func {
setprop("FMGC/keyboard-right", 1);
gui.showDialog("mcdu2");
}

View file

@ -17,7 +17,8 @@ var MCDU_reset = func(i) {
setprop("MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
setprop("MCDU/keyboard-entry", 0);
setprop("FMGC/keyboard-left", 0);
setprop("FMGC/keyboard-right", 0);
#ACCONFIG
setprop("FMGC/internal/navdatabase", "01JAN-28JAN");

View file

@ -23,6 +23,10 @@
<pref-height>20</pref-height>
<legend>X</legend>
<key>Esc</key>
<binding>
<command>nasal</command>
<script>setprop("FMGC/keyboard-left", 0);</script>
</binding>
<binding>
<command>dialog-close</command>
</binding>

View file

@ -23,6 +23,10 @@
<pref-height>20</pref-height>
<legend>X</legend>
<key>Esc</key>
<binding>
<command>nasal</command>
<script>setprop("FMGC/keyboard-right", 0);</script>
</binding>
<binding>
<command>dialog-close</command>
</binding>