1
0
Fork 0
A320-family/Nasal/Displays/CanvasQNH.nas

39 lines
967 B
Text
Raw Permalink Normal View History

2020-08-28 14:40:33 +00:00
# A3XX Canvas QNH
# Jonathan Redpath (legoboyvdlp)
# Copyright (c) 2020 Jonathan Redpath (legoboyvdlp)
var QNH1 = nil;
var QNH2 = nil;
var QNHCanvasParent = {
canvasQNH: nil,
qnhGroup: nil,
line1: nil,
new: func(placement, tex) {
var QNHCanvas = {parents: [QNHCanvasParent]};
QNHCanvas.canvasQNH = canvas.new({
"name": "QNH1",
"size": [256, 128],
"view": [256, 128],
"mipmapping": 0
});
QNHCanvas.canvasQNH.addPlacement({"node": placement, "texture": tex});
QNHCanvas.canvasQNH.setColorBackground(0.01, 0.075, 0.00, 1.00);
QNHCanvas.qnhGroup = QNHCanvas.canvasQNH.createGroup();
QNHCanvas.qnhGroup.show();
QNHCanvas.line1 = QNHCanvas.qnhGroup.createChild("text")
.setFontSize(13, 1)
.setColor([0.45,0.98,0.06])
.setAlignment("left-bottom-baseline")
2022-02-18 14:27:51 +00:00
.setFont("Airbus7Seg.ttf")
2020-08-28 14:40:33 +00:00
.setText("8888");
return QNHCanvas;
},
};
if (QNH1 == nil) {
# QNH1 = QNHCanvasParent.new("efis_foil_display", "glare_sw.png");
}