Keyboard mode now based on dialog visibility, add support for cap-lock/shift, implrment independent MCDU text entry
This commit is contained in:
parent
7cbba48fbc
commit
cfcea38a1e
5 changed files with 1145 additions and 150 deletions
1277
A320-main.xml
1277
A320-main.xml
File diff suppressed because it is too large
Load diff
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue