Merge master
This commit is contained in:
commit
7268073607
5 changed files with 150 additions and 22 deletions
|
@ -41,9 +41,9 @@
|
|||
inkscape:window-height="1030"
|
||||
id="namedview371"
|
||||
showgrid="true"
|
||||
inkscape:zoom="0.25"
|
||||
inkscape:cx="1402.5446"
|
||||
inkscape:cy="508.4561"
|
||||
inkscape:zoom="0.70710678"
|
||||
inkscape:cx="927.599"
|
||||
inkscape:cy="590.48297"
|
||||
inkscape:window-x="1592"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
|
@ -55,13 +55,22 @@
|
|||
type="xygrid"
|
||||
id="grid5153" />
|
||||
</sodipodi:namedview>
|
||||
<rect
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:3.67089081;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
id="Test_white"
|
||||
width="1020.3291"
|
||||
height="1020.3291"
|
||||
x="1.8354454"
|
||||
y="1.8354164"
|
||||
inkscape:label="#rect4136" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:32px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="511.80469"
|
||||
y="494.27536"
|
||||
id="text4335"
|
||||
sodipodi:linespacing="125%"><tspan
|
||||
id="Test_text"
|
||||
sodipodi:linespacing="125%"
|
||||
inkscape:label="#text4335"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4337"
|
||||
x="511.80469"
|
||||
|
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.8 KiB |
|
@ -111,6 +111,7 @@ var canvas_lowerECAM_base = {
|
|||
lowerECAM_wheel.page.hide();
|
||||
lowerECAM_door.page.hide();
|
||||
lowerECAM_test.page.show();
|
||||
lowerECAM_test.update();
|
||||
} else {
|
||||
lowerECAM_test.page.hide();
|
||||
page = getprop("/ECAM/Lower/page");
|
||||
|
@ -1327,6 +1328,11 @@ var canvas_lowerECAM_test = {
|
|||
};
|
||||
|
||||
canvas.parsesvg(canvas_group, file, {"font-mapper": font_mapper});
|
||||
|
||||
var svg_keys = me.getKeys();
|
||||
foreach(var key; svg_keys) {
|
||||
me[key] = canvas_group.getElementById(key);
|
||||
}
|
||||
|
||||
me.page = canvas_group;
|
||||
|
||||
|
@ -1338,6 +1344,18 @@ var canvas_lowerECAM_test = {
|
|||
|
||||
return m;
|
||||
},
|
||||
getKeys: func() {
|
||||
return ["Test_white","Test_text"];
|
||||
},
|
||||
update: func() {
|
||||
if (getprop("/instrumentation/du/du4-test-time") + 1 >= elapsedtime) {
|
||||
me["Test_white"].show();
|
||||
me["Test_text"].hide();
|
||||
} else {
|
||||
me["Test_white"].hide();
|
||||
me["Test_text"].show();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
setlistener("sim/signals/fdm-initialized", func {
|
||||
|
|
|
@ -109,9 +109,11 @@ var canvas_nd_base = {
|
|||
if (getprop("/instrumentation/du/du2-test-time") + getprop("/instrumentation/du/du2-test-amount") >= elapsedtime and getprop("/modes/cpt-du-xfr") != 1) {
|
||||
ND_1.page.hide();
|
||||
ND_1_test.page.show();
|
||||
ND_1_test.update();
|
||||
} else if (getprop("/instrumentation/du/du1-test-time") + getprop("/instrumentation/du/du1-test-amount") >= elapsedtime and getprop("/modes/cpt-du-xfr") == 1) {
|
||||
ND_1.page.hide();
|
||||
ND_1_test.page.show();
|
||||
ND_1_test.update();
|
||||
} else {
|
||||
ND_1_test.page.hide();
|
||||
ND_1.page.show();
|
||||
|
@ -125,9 +127,11 @@ var canvas_nd_base = {
|
|||
if (getprop("/instrumentation/du/du5-test-time") + getprop("/instrumentation/du/du6-test-amount") >= elapsedtime and getprop("/modes/fo-du-xfr") != 1) {
|
||||
ND_2.page.hide();
|
||||
ND_2_test.page.show();
|
||||
ND_2_test.update();
|
||||
} else if (getprop("/instrumentation/du/du6-test-time") + getprop("/instrumentation/du/du5-test-amount") >= elapsedtime and getprop("/modes/fo-du-xfr") == 1) {
|
||||
ND_2.page.hide();
|
||||
ND_2_test.page.show();
|
||||
ND_2_test.update();
|
||||
} else {
|
||||
ND_2_test.page.hide();
|
||||
ND_2.page.show();
|
||||
|
@ -187,6 +191,11 @@ var canvas_ND_1_test = {
|
|||
};
|
||||
|
||||
canvas.parsesvg(canvas_group, file, {"font-mapper": font_mapper});
|
||||
|
||||
var svg_keys = me.getKeys();
|
||||
foreach(var key; svg_keys) {
|
||||
me[key] = canvas_group.getElementById(key);
|
||||
}
|
||||
|
||||
me.page = canvas_group;
|
||||
|
||||
|
@ -198,6 +207,21 @@ var canvas_ND_1_test = {
|
|||
|
||||
return m;
|
||||
},
|
||||
getKeys: func() {
|
||||
return ["Test_white","Test_text"];
|
||||
},
|
||||
update: func() {
|
||||
if (getprop("/instrumentation/du/du2-test-time") + 1 >= elapsedtime and getprop("/modes/cpt-du-xfr") != 1) {
|
||||
me["Test_white"].show();
|
||||
me["Test_text"].hide();
|
||||
} else if (getprop("/instrumentation/du/du1-test-time") + 1 >= elapsedtime and getprop("/modes/cpt-du-xfr") == 1) {
|
||||
me["Test_white"].show();
|
||||
me["Test_text"].hide();
|
||||
} else {
|
||||
me["Test_white"].hide();
|
||||
me["Test_text"].show();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
var canvas_ND_2_test = {
|
||||
|
@ -207,6 +231,11 @@ var canvas_ND_2_test = {
|
|||
};
|
||||
|
||||
canvas.parsesvg(canvas_group, file, {"font-mapper": font_mapper});
|
||||
|
||||
var svg_keys = me.getKeys();
|
||||
foreach(var key; svg_keys) {
|
||||
me[key] = canvas_group.getElementById(key);
|
||||
}
|
||||
|
||||
me.page = canvas_group;
|
||||
|
||||
|
@ -218,6 +247,21 @@ var canvas_ND_2_test = {
|
|||
|
||||
return m;
|
||||
},
|
||||
getKeys: func() {
|
||||
return ["Test_white","Test_text"];
|
||||
},
|
||||
update: func() {
|
||||
if (getprop("/instrumentation/du/du5-test-time") + 1 >= elapsedtime and getprop("/modes/cpt-du-xfr") != 1) {
|
||||
me["Test_white"].show();
|
||||
me["Test_text"].hide();
|
||||
} else if (getprop("/instrumentation/du/du6-test-time") + 1 >= elapsedtime and getprop("/modes/cpt-du-xfr") == 1) {
|
||||
me["Test_white"].show();
|
||||
me["Test_text"].hide();
|
||||
} else {
|
||||
me["Test_white"].hide();
|
||||
me["Test_text"].show();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
setlistener("sim/signals/fdm-initialized", func {
|
||||
|
|
|
@ -87,25 +87,20 @@ var canvas_PFD_base = {
|
|||
var svg_keys = me.getKeys();
|
||||
foreach(var key; svg_keys) {
|
||||
me[key] = canvas_group.getElementById(key);
|
||||
var svg_keys = me.getKeys();
|
||||
|
||||
foreach (var key; svg_keys) {
|
||||
me[key] = canvas_group.getElementById(key);
|
||||
var clip_el = canvas_group.getElementById(key ~ "_clip");
|
||||
if (clip_el != nil) {
|
||||
clip_el.setVisible(0);
|
||||
var tran_rect = clip_el.getTransformedBounds();
|
||||
|
||||
var clip_el = canvas_group.getElementById(key ~ "_clip");
|
||||
if (clip_el != nil) {
|
||||
clip_el.setVisible(0);
|
||||
var tran_rect = clip_el.getTransformedBounds();
|
||||
|
||||
var clip_rect = sprintf("rect(%d,%d, %d,%d)",
|
||||
tran_rect[1], # 0 ys
|
||||
tran_rect[2], # 1 xe
|
||||
tran_rect[3], # 2 ye
|
||||
tran_rect[0]); #3 xs
|
||||
# coordinates are top,right,bottom,left (ys, xe, ye, xs) ref: l621 of simgear/canvas/CanvasElement.cxx
|
||||
me[key].set("clip", clip_rect);
|
||||
me[key].set("clip-frame", canvas.Element.PARENT);
|
||||
}
|
||||
var clip_rect = sprintf("rect(%d,%d, %d,%d)",
|
||||
tran_rect[1], # 0 ys
|
||||
tran_rect[2], # 1 xe
|
||||
tran_rect[3], # 2 ye
|
||||
tran_rect[0]); #3 xs
|
||||
# coordinates are top,right,bottom,left (ys, xe, ye, xs) ref: l621 of simgear/canvas/CanvasElement.cxx
|
||||
me[key].set("clip", clip_rect);
|
||||
me[key].set("clip-frame", canvas.Element.PARENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,9 +160,11 @@ var canvas_PFD_base = {
|
|||
if (getprop("/instrumentation/du/du1-test-time") + getprop("/instrumentation/du/du1-test-amount") >= elapsedtime and getprop("/modes/cpt-du-xfr") != 1) {
|
||||
PFD_1.page.hide();
|
||||
PFD_1_test.page.show();
|
||||
PFD_1_test.update();
|
||||
} else if (getprop("/instrumentation/du/du2-test-time") + getprop("/instrumentation/du/du2-test-amount") >= elapsedtime and getprop("/modes/cpt-du-xfr") == 1) {
|
||||
PFD_1.page.hide();
|
||||
PFD_1_test.page.show();
|
||||
PFD_1_test.update();
|
||||
} else {
|
||||
PFD_1_test.page.hide();
|
||||
PFD_1.page.show();
|
||||
|
@ -181,9 +178,11 @@ var canvas_PFD_base = {
|
|||
if (getprop("/instrumentation/du/du6-test-time") + getprop("/instrumentation/du/du6-test-amount") >= elapsedtime and getprop("/modes/fo-du-xfr") != 1) {
|
||||
PFD_2.page.hide();
|
||||
PFD_2_test.page.show();
|
||||
PFD_2_test.update();
|
||||
} else if (getprop("/instrumentation/du/du5-test-time") + getprop("/instrumentation/du/du5-test-amount") >= elapsedtime and getprop("/modes/fo-du-xfr") == 1) {
|
||||
PFD_2.page.hide();
|
||||
PFD_2_test.page.show();
|
||||
PFD_2_test.update();
|
||||
} else {
|
||||
PFD_2_test.page.hide();
|
||||
PFD_2.page.show();
|
||||
|
@ -1001,6 +1000,11 @@ var canvas_PFD_1_test = {
|
|||
};
|
||||
|
||||
canvas.parsesvg(canvas_group, file, {"font-mapper": font_mapper});
|
||||
|
||||
var svg_keys = me.getKeys();
|
||||
foreach(var key; svg_keys) {
|
||||
me[key] = canvas_group.getElementById(key);
|
||||
}
|
||||
|
||||
me.page = canvas_group;
|
||||
|
||||
|
@ -1012,6 +1016,21 @@ var canvas_PFD_1_test = {
|
|||
|
||||
return m;
|
||||
},
|
||||
getKeys: func() {
|
||||
return ["Test_white","Test_text"];
|
||||
},
|
||||
update: func() {
|
||||
if (getprop("/instrumentation/du/du1-test-time") + 1 >= elapsedtime and getprop("/modes/cpt-du-xfr") != 1) {
|
||||
me["Test_white"].show();
|
||||
me["Test_text"].hide();
|
||||
} else if (getprop("/instrumentation/du/du2-test-time") + 1 >= elapsedtime and getprop("/modes/cpt-du-xfr") == 1) {
|
||||
me["Test_white"].show();
|
||||
me["Test_text"].hide();
|
||||
} else {
|
||||
me["Test_white"].hide();
|
||||
me["Test_text"].show();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
var canvas_PFD_2_test = {
|
||||
|
@ -1021,6 +1040,11 @@ var canvas_PFD_2_test = {
|
|||
};
|
||||
|
||||
canvas.parsesvg(canvas_group, file, {"font-mapper": font_mapper});
|
||||
|
||||
var svg_keys = me.getKeys();
|
||||
foreach(var key; svg_keys) {
|
||||
me[key] = canvas_group.getElementById(key);
|
||||
}
|
||||
|
||||
me.page = canvas_group;
|
||||
|
||||
|
@ -1032,6 +1056,21 @@ var canvas_PFD_2_test = {
|
|||
|
||||
return m;
|
||||
},
|
||||
getKeys: func() {
|
||||
return ["Test_white","Test_text"];
|
||||
},
|
||||
update: func() {
|
||||
if (getprop("/instrumentation/du/du6-test-time") + 1 >= elapsedtime and getprop("/modes/fo-du-xfr") != 1) {
|
||||
me["Test_white"].show();
|
||||
me["Test_text"].hide();
|
||||
} else if (getprop("/instrumentation/du/du5-test-time") + 1 >= elapsedtime and getprop("/modes/fo-du-xfr") == 1) {
|
||||
me["Test_white"].show();
|
||||
me["Test_text"].hide();
|
||||
} else {
|
||||
me["Test_white"].hide();
|
||||
me["Test_text"].show();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
setlistener("sim/signals/fdm-initialized", func {
|
||||
|
|
|
@ -69,6 +69,7 @@ var canvas_upperECAM_base = {
|
|||
upperECAM_cfm_eis2.page.hide();
|
||||
upperECAM_iae_eis2.page.hide();
|
||||
upperECAM_test.page.show();
|
||||
upperECAM_test.update();
|
||||
} else {
|
||||
upperECAM_test.page.hide();
|
||||
if (getprop("/options/eng") == "CFM") {
|
||||
|
@ -816,6 +817,11 @@ var canvas_upperECAM_test = {
|
|||
};
|
||||
|
||||
canvas.parsesvg(canvas_group, file, {"font-mapper": font_mapper});
|
||||
|
||||
var svg_keys = me.getKeys();
|
||||
foreach(var key; svg_keys) {
|
||||
me[key] = canvas_group.getElementById(key);
|
||||
}
|
||||
|
||||
me.page = canvas_group;
|
||||
|
||||
|
@ -827,6 +833,18 @@ var canvas_upperECAM_test = {
|
|||
|
||||
return m;
|
||||
},
|
||||
getKeys: func() {
|
||||
return ["Test_white","Test_text"];
|
||||
},
|
||||
update: func() {
|
||||
if (getprop("/instrumentation/du/du3-test-time") + 1 >= elapsedtime) {
|
||||
me["Test_white"].show();
|
||||
me["Test_text"].hide();
|
||||
} else {
|
||||
me["Test_white"].hide();
|
||||
me["Test_text"].show();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
setlistener("sim/signals/fdm-initialized", func {
|
||||
|
|
Reference in a new issue