1
0
Fork 0
This commit is contained in:
legoboyvdlp R 2020-05-23 00:47:43 +01:00
parent b4921743ad
commit 5788e99be3
3 changed files with 1913 additions and 1901 deletions

View file

@ -4005,6 +4005,7 @@
<file>Aircraft/A320-family/Nasal/FMGC/FMGC.nas</file>
<file>Aircraft/A320-family/Nasal/FMGC/FMGC-b.nas</file>
<file>Aircraft/A320-family/Nasal/FMGC/FMGC-c.nas</file>
<file>Aircraft/A320-family/Nasal/FMGC/mcdu-messages.nas</file>
</fmgc>
<mcdu>
<file>Aircraft/A320-family/Nasal/MCDU/DUPLICATE.nas</file> <!-- dynamic page - init before others as used in various pages -->

File diff suppressed because it is too large Load diff

View file

@ -11,16 +11,20 @@ var TypeIMessage = {
};
var TypeIIMessage = {
new: func(msgText, colour, isInhibit: 0,) {
new: func(msgText, colour, isInhibit = 0) {
var msg = { parents: [TypeIIMessage] };
msg.msgText = msgText;
msg.colour = colour;
msg.inhibitable: isInhibit;
msg.inhibitable = isInhibit;
return msg;
},
};
var MessageQueueController = {
new: func() {
var msgC = { parents: [MessageQueueController] };
return msgC;
},
messages: std.Vector.new(), # show left to right
# first in first out
addNewMsg: func(msg) {
@ -41,10 +45,15 @@ var MessageQueueController = {
};
var scratchpadController = {
scratchpad: "",
scratchpadSave: "",
scratchpadShowTypeIMsg: 0,
scratchpadShowTypeIIMsg: 0,
new: func() {
var sp = { parents: [scratchpadController] };
sp.scratchpad = "";
sp.scratchpadSave = "";
sp.scratchpadColour = "w";
scratchpadShowTypeIMsg = 0;
scratchpadShowTypeIIMsg = 0;
return sp;
},
addCharToScratchpad: func(character) {
if (size(me.scratchpad) >= 22) {
@ -118,10 +127,10 @@ var MessageController = {
]),
getTypeIMsgByText: func(text) {
return me.getMsgByText(text, me.typeIMessages);
return me.getMsgByText(text, me.typeIMessages.vector);
},
getTypeIIMsgByText: func(text) {
return me.getMsgByText(text, me.typeIIMessages);
return me.getMsgByText(text, me.typeIIMessages.vector);
},
getMsgByText: func(text, theVector) {
foreach (var message; theVector) {
@ -131,4 +140,6 @@ var MessageController = {
}
return nil;
},
};
};
var scratchpads = [scratchpadController.new(), scratchpadController.new()];