1
0
Fork 0

Hide debug, DRAFT title and ttle colour, also new font for symbols

This commit is contained in:
legoboyvdlp R 2020-06-14 12:02:45 +01:00
parent 946c8ce3b2
commit 1abf474b58
6 changed files with 74 additions and 57 deletions

View file

@ -24,7 +24,8 @@ var myCRZWIND = [nil, nil];
var myDESWIND = [nil, nil];
var myHISTWIND = [nil, nil];
var default = "BoeingCDU-Large.ttf";
var symbol = "helvetica_medium.txf";
#var symbol = "helvetica_medium.txf";
var symbol = "LiberationMonoCustom.ttf";
var normal = 70;
var small = 56;
var page = "";
@ -3179,10 +3180,10 @@ var canvas_MCDU_base = {
me["PROG"].hide();
me["PERFTO"].hide();
# if (page == "WINDCRZ") {
# up/down arrows show
# } else {
# up/down arrows hide
# }
# up/down arrows show
# } else {
# up/down arrows hide
# }
me["Simple_PageNum"].setText("X/X");
me["Simple_PageNum"].hide();
me["Simple_Title"].show();
@ -3231,6 +3232,7 @@ var canvas_MCDU_base = {
} else {
me["Simple_Title"].setText(sprintf("%s", myWind[i].title));
}
me["Simple_Title"].setColor(getprop("/MCDUC/colors/" ~ myWind[i].titleColour ~ "/r"), getprop("/MCDUC/colors/" ~ myWind[i].titleColour ~ "/g"), getprop("/MCDUC/colors/" ~ myWind[i].titleColour ~ "/b"));
forindex (var matrixArrow; myWind[i].arrowsMatrix) {
if (matrixArrow == 0) {

View file

@ -171,7 +171,7 @@ var flightPlanController = {
}
me.addDiscontinuity(1, plan);
debug.dump(me.flightplans[2]);
#debug.dump(me.flightplans[2]);
# reset mcdu if it exists
if (canvas_mcdu.myFpln[0] != nil) { canvas_mcdu.myFpln[0].scroll = 0; }
if (canvas_mcdu.myFpln[1] != nil) { canvas_mcdu.myFpln[1].scroll = 0; }
@ -657,7 +657,7 @@ var flightPlanController = {
getNavCount: func(plan) {
var count = 0;
for (var wpt = 0; wpt < me.flightplans[plan].getPlanSize(); wpt += 1) {
print(me.flightplans[plan].getWP(wpt).wp_type);
#print(me.flightplans[plan].getWP(wpt).wp_type);
if (me.flightplans[plan].getWP(wpt).wp_type == "navaid") {
count += 1;
}
@ -668,7 +668,7 @@ var flightPlanController = {
getDepartureCount: func(plan) {
var count = 0;
for (var wpt = 0; wpt < me.flightplans[plan].getPlanSize(); wpt += 1) {
print(me.flightplans[plan].getWP(wpt).wp_role);
#print(me.flightplans[plan].getWP(wpt).wp_role);
if (me.flightplans[plan].getWP(wpt).wp_role == "sid") {
count += 1;
}

View file

@ -136,7 +136,7 @@ var vertRev = {
},
pushButtonLeft: func(index) {
if (index == 5) {
print("role: ", me.wp.wp_role, ", type: ", me.wp.wp_type);
#print("role: ", me.wp.wp_role, ", type: ", me.wp.wp_type);
if (me.wp.wp_role == "sid") {
if (canvas_mcdu.myCLBWIND[me.computer] == nil) {
canvas_mcdu.myCLBWIND[me.computer] = windCLBPage.new(me.computer);

View file

@ -4,6 +4,7 @@
var windCLBPage = {
title: nil,
titleColour: "wht",
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
@ -42,7 +43,6 @@ var windCLBPage = {
},
_setupPageWithData: func() {
me.title = "CLIMB WIND";
#me.title = "DRAFT CLIMB WIND";
me.titleColour = "wht";
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 1, 0]];
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "ack"], ["wht", "ack", "ack", "ack", "wht", "ack"]];
@ -73,8 +73,8 @@ var windCLBPage = {
var wind = 0;
wind = fmgc.windController.clb_winds[computer_temp].wind5;
if (wind.altitude != "") {
me.L5 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][4] = 0;
me.L5 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][4] = 1;
} else {
me.L5 = ["[ ]/[ ]/[ ]", nil, "blu"];
me.fontMatrix[0][4] = 1;
@ -86,8 +86,8 @@ var windCLBPage = {
if (me.items >= 4) {
wind = fmgc.windController.clb_winds[computer_temp].wind4;
if (wind.altitude != "") {
me.L4 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][3] = 0;
me.L4 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][3] = 1;
} else {
me.L4 = ["[ ]/[ ]/[ ]", nil, "blu"];
me.fontMatrix[0][3] = 1;
@ -99,8 +99,8 @@ var windCLBPage = {
if (me.items >= 3) {
wind = fmgc.windController.clb_winds[computer_temp].wind3;
if (wind.altitude != "") {
me.L3 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][2] = 0;
me.L3 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][2] = 1;
} else {
me.L3 = ["[ ]/[ ]/[ ]", nil, "blu"];
me.fontMatrix[0][2] = 1;
@ -112,8 +112,8 @@ var windCLBPage = {
if (me.items >= 2) {
wind = fmgc.windController.clb_winds[computer_temp].wind2;
if (wind.altitude != "") {
me.L2 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][1] = 0;
me.L2 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][1] = 1;
} else {
me.L2 = ["[ ]/[ ]/[ ]", nil, "blu"];
me.fontMatrix[0][1] = 1;
@ -125,8 +125,8 @@ var windCLBPage = {
if (me.items >= 1) {
wind = fmgc.windController.clb_winds[computer_temp].wind1;
if (wind.altitude != "") {
me.L1 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, "TRU WIND/ALT", "blu"];
me.fontMatrix[0][0] = 0;
me.L1 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, "TRU WIND/ALT", "blu"];
me.fontMatrix[0][0] = 1;
} else {
me.L1 = ["[ ]/[ ]/[ ]", "TRU WIND/ALT", "blu"];
me.fontMatrix[0][0] = 1;
@ -155,7 +155,8 @@ var windCLBPage = {
me.L6 = [" CANCEL", " WIND", "amb"];
me.R6 = ["UPDATE ", "WIND ", "amb"];
me.arrowsMatrix[0][5] = 0;
#draft title
me.title = "DRAFT CLIMB WIND";
me.titleColour = "yel";
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
} else {
me.L1[2] = "blu";
@ -166,7 +167,8 @@ var windCLBPage = {
me.L6 = [" RETURN", nil, "wht"];
me.R6 = [nil, nil, "ack"];
me.arrowsMatrix[0][5] = 1;
#draft title
me.title = "CLIMB WIND";
me.titleColour = "wht";
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
}
},

View file

@ -4,6 +4,7 @@
var windCRZPage = {
title: [nil, nil, nil],
titleColour: "wht",
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
@ -49,7 +50,6 @@ var windCRZPage = {
return nil;
},
_setupPageWithData: func() {
print("setup called");
if (me.singleCRZ == 1) {
me.title = ["","CRZ WIND",""];
@ -98,8 +98,8 @@ var windCRZPage = {
if (me.items >= 4) {
wind = fmgc.windController.crz_winds[computer_temp].wind4;
if (wind.altitude != "") {
me.L4 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][3] = 0;
me.L4 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][3] = 1;
} else {
me.L4 = ["[ ]/[ ]/[ ]", nil, "blu"];
me.fontMatrix[0][3] = 1;
@ -111,8 +111,8 @@ var windCRZPage = {
if (me.items >= 3) {
wind = fmgc.windController.crz_winds[computer_temp].wind3;
if (wind.altitude != "") {
me.L3 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][2] = 0;
me.L3 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][2] = 1;
} else {
me.L3 = ["[ ]/[ ]/[ ]", nil, "blu"];
me.fontMatrix[0][2] = 1;
@ -124,8 +124,8 @@ var windCRZPage = {
if (me.items >= 2) {
wind = fmgc.windController.crz_winds[computer_temp].wind2;
if (wind.altitude != "") {
me.L2 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][1] = 0;
me.L2 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][1] = 1;
} else {
me.L2 = ["[ ]/[ ]/[ ]", nil, "blu"];
me.fontMatrix[0][1] = 1;
@ -137,8 +137,8 @@ var windCRZPage = {
if (me.items >= 1) {
wind = fmgc.windController.crz_winds[computer_temp].wind1;
if (wind.altitude != "") {
me.L1 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, "TRU WIND/ALT", "blu"];
me.fontMatrix[0][0] = 0;
me.L1 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, "TRU WIND/ALT", "blu"];
me.fontMatrix[0][0] = 1;
} else {
me.L1 = ["[ ]/[ ]/[ ]", "TRU WIND/ALT", "blu"];
me.fontMatrix[0][0] = 1;
@ -148,7 +148,7 @@ var windCRZPage = {
wind = fmgc.windController.crz_winds[computer_temp].sat1;
if (wind.altitude != "") {
me.L5 = [wind.temp ~ "/" ~ wind.altitude, "SAT / ALT", "blu"];
me.fontMatrix[0][4] = 0;
me.fontMatrix[0][4] = 1;
} else {
me.L5 = ["[ ]/[ ]", "SAT / ALT", "blu"];
me.fontMatrix[0][4] = 1;
@ -157,8 +157,8 @@ var windCRZPage = {
if (me.items >= 4) {
wind = fmgc.windController.winds[computer_temp][me.match_location].wind4;
if (wind.altitude != "") {
me.L4 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][3] = 0;
me.L4 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][3] = 1;
} else {
me.L4 = ["[ ]/[ ]/[ ]", nil, "blu"];
me.fontMatrix[0][3] = 1;
@ -170,8 +170,8 @@ var windCRZPage = {
if (me.items >= 3) {
wind = fmgc.windController.winds[computer_temp][me.match_location].wind3;
if (wind.altitude != "") {
me.L3 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][2] = 0;
me.L3 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][2] = 1;
} else {
me.L3 = ["[ ]/[ ]/[ ]", nil, "blu"];
me.fontMatrix[0][2] = 1;
@ -183,8 +183,8 @@ var windCRZPage = {
if (me.items >= 2) {
wind = fmgc.windController.winds[computer_temp][me.match_location].wind2;
if (wind.altitude != "") {
me.L2 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][1] = 0;
me.L2 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][1] = 1;
} else {
me.L2 = ["[ ]/[ ]/[ ]", nil, "blu"];
me.fontMatrix[0][1] = 1;
@ -196,8 +196,8 @@ var windCRZPage = {
if (me.items >= 1) {
wind = fmgc.windController.winds[computer_temp][me.match_location].wind1;
if (wind.altitude != "") {
me.L1 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, "TRU WIND/ALT", "blu"];
me.fontMatrix[0][0] = 0;
me.L1 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, "TRU WIND/ALT", "blu"];
me.fontMatrix[0][0] = 1;
} else {
me.L1 = ["[ ]/[ ]/[ ]", "TRU WIND/ALT", "blu"];
me.fontMatrix[0][0] = 1;
@ -207,7 +207,7 @@ var windCRZPage = {
wind = fmgc.windController.winds[computer_temp][me.match_location].sat1;
if (wind.altitude != "") {
me.L5 = [wind.temp ~ "/" ~ wind.altitude, "SAT / ALT", "blu"];
me.fontMatrix[0][4] = 0;
me.fontMatrix[0][4] = 1;
} else {
me.L5 = ["[ ]/[ ]", "SAT / ALT", "blu"];
me.fontMatrix[0][4] = 1;
@ -236,7 +236,12 @@ var windCRZPage = {
me.L6 = [" CANCEL", "UPDATE", "amb"];
me.R6 = ["INSERT ", "UPDATE ", "amb"];
me.arrowsMatrix[0][5] = 0;
#draft title
if (me.singleCRZ == 1) {
me.title = ["","DRAFT CRZ WIND",""];
} else {
me.title = ["DRAFT CRZ WIND", " AT ", me.waypoint.wp_name];
}
me.titleColour = "yel";
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
} else {
me.L1[2] = "blu";
@ -247,7 +252,12 @@ var windCRZPage = {
me.L6 = [" RETURN", nil, "wht"];
me.R6 = [nil, nil, "ack"];
me.arrowsMatrix[0][5] = 1;
#draft title
if (me.singleCRZ == 1) {
me.title = ["","CRZ WIND",""];
} else {
me.title = ["CRZ WIND", " AT ", me.waypoint.wp_name];
}
me.titleColour = "wht";
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
}
},

View file

@ -4,6 +4,7 @@
var windDESPage = {
title: nil,
titleColour: "wht",
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
@ -73,8 +74,8 @@ var windDESPage = {
var wind = 0;
wind = fmgc.windController.des_winds[computer_temp].wind5;
if (wind.altitude != "") {
me.L5 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][4] = 0;
me.L5 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][4] = 1;
} else {
me.L5 = ["[ ]/[ ]/[ ]", nil, "blu"];
me.fontMatrix[0][4] = 1;
@ -86,8 +87,8 @@ var windDESPage = {
if (me.items >= 4) {
wind = fmgc.windController.des_winds[computer_temp].wind4;
if (wind.altitude != "") {
me.L4 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][3] = 0;
me.L4 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][3] = 1;
} else {
me.L4 = ["[ ]/[ ]/[ ]", nil, "blu"];
me.fontMatrix[0][3] = 1;
@ -99,8 +100,8 @@ var windDESPage = {
if (me.items >= 3) {
wind = fmgc.windController.des_winds[computer_temp].wind3;
if (wind.altitude != "") {
me.L3 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][2] = 0;
me.L3 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][2] = 1;
} else {
me.L3 = ["[ ]/[ ]/[ ]", nil, "blu"];
me.fontMatrix[0][2] = 1;
@ -112,8 +113,8 @@ var windDESPage = {
if (me.items >= 2) {
wind = fmgc.windController.des_winds[computer_temp].wind2;
if (wind.altitude != "") {
me.L2 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][1] = 0;
me.L2 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, nil, "blu"];
me.fontMatrix[0][1] = 1;
} else {
me.L2 = ["[ ]/[ ]/[ ]", nil, "blu"];
me.fontMatrix[0][1] = 1;
@ -125,8 +126,8 @@ var windDESPage = {
if (me.items >= 1) {
wind = fmgc.windController.des_winds[computer_temp].wind1;
if (wind.altitude != "") {
me.L1 = [wind.heading ~ "/" ~ wind.magnitude ~ "/" ~ wind.altitude, "TRU WIND/ALT", "blu"];
me.fontMatrix[0][0] = 0;
me.L1 = [wind.heading ~ "°/" ~ wind.magnitude ~ "/" ~ wind.altitude, "TRU WIND/ALT", "blu"];
me.fontMatrix[0][0] = 1;
} else {
me.L1 = ["[ ]/[ ]/[ ]", "TRU WIND/ALT", "blu"];
me.fontMatrix[0][0] = 1;
@ -138,8 +139,8 @@ var windDESPage = {
if (getprop("/FMGC/internal/alt-set")) {
wind = fmgc.windController.des_winds[computer_temp].alt1;
if (wind.heading != 0 and wind.magnitude != 0) {
me.R1 = [wind.heading ~ "/" ~ wind.magnitude, "ALTN WIND ", "blu"];
me.fontMatrix[1][0] = 0;
me.R1 = [wind.heading ~ "°/" ~ wind.magnitude, "ALTN WIND ", "blu"];
me.fontMatrix[1][0] = 1;
} else {
me.R1 = ["[ ]/[ ]", "ALTN WIND ", "blu"];
me.fontMatrix[1][0] = 1;
@ -169,7 +170,8 @@ var windDESPage = {
me.L6 = [" CANCEL", " WIND", "amb"];
me.R6 = ["UPDATE ", "WIND ", "amb"];
me.arrowsMatrix[0][5] = 0;
#draft title
me.title = "DRAFT DES WIND";
me.titleColour = "yel";
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
} else {
me.L1[2] = "blu";
@ -181,7 +183,8 @@ var windDESPage = {
me.L6 = [" RETURN", nil, "wht"];
me.R6 = [nil, nil, "ack"];
me.arrowsMatrix[0][5] = 1;
#draft title
me.title = "DES WIND";
me.titleColour = "wht";
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
}
},