Refactor FG1000 in preparation for PFD, 3D model.
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 240 KiB After Width: | Height: | Size: 240 KiB |
Before Width: | Height: | Size: 1,004 KiB After Width: | Height: | Size: 1,004 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
@ -1,7 +1,5 @@
|
|||
|
||||
io.include("constants.nas");
|
||||
|
||||
|
||||
io.include("Constants.nas");
|
||||
|
||||
var MFDGUI =
|
||||
{
|
||||
|
@ -151,7 +149,7 @@ var MFDGUI =
|
|||
|
||||
# Create the surround fascia, which is just a PNG image;
|
||||
var child = obj.root.createChild("image")
|
||||
.setFile("Aircraft/Instruments-3d/FG1000/Models/fascia.png")
|
||||
.setFile("Aircraft/Instruments-3d/FG1000/Dialogs/fascia.png")
|
||||
.set("z-index", 100)
|
||||
.setTranslation(0, 0)
|
||||
.setSize(obj.scale*obj.width,obj.scale*obj.height);
|
|
@ -4,8 +4,8 @@ print("##############");
|
|||
print("# FG1000 MFD #");
|
||||
print("##############\n");
|
||||
|
||||
io.include("constants.nas");
|
||||
io.include("commands.nas");
|
||||
io.include("Constants.nas");
|
||||
io.include("Commands.nas");
|
||||
|
||||
var nasal_dir = getprop("/sim/fg-root") ~ "/Aircraft/Instruments-3d/FG1000/Nasal/";
|
||||
|
||||
|
@ -14,10 +14,13 @@ io.load_nasal(nasal_dir ~ '/ConfigStore.nas', "fg1000");
|
|||
io.load_nasal(nasal_dir ~ '/MFDPage.nas', "fg1000");
|
||||
io.load_nasal(nasal_dir ~ '/MFDPageController.nas', "fg1000");
|
||||
|
||||
io.load_nasal(nasal_dir ~ '/EIS/EIS.nas', "fg1000");
|
||||
io.load_nasal(nasal_dir ~ '/EIS/EISStyles.nas', "fg1000");
|
||||
io.load_nasal(nasal_dir ~ '/EIS/EISOptions.nas', "fg1000");
|
||||
io.load_nasal(nasal_dir ~ '/EIS/EISController.nas', "fg1000");
|
||||
|
||||
var MFDPages = [
|
||||
"Surround",
|
||||
"NavigationMap",
|
||||
"EIS",
|
||||
"TrafficMap",
|
||||
"Stormscope",
|
||||
"WeatherDataLink",
|
||||
|
@ -55,13 +58,14 @@ var MFDPages = [
|
|||
"NearestFrequencies",
|
||||
"NearestAirspaces",
|
||||
"DirectTo", # display at the top of the stack
|
||||
"Surround",
|
||||
];
|
||||
|
||||
foreach (var page; MFDPages) {
|
||||
io.load_nasal(nasal_dir ~ page ~ '/' ~ page ~ '.nas', "fg1000");
|
||||
io.load_nasal(nasal_dir ~ page ~ '/' ~ page ~ 'Styles.nas', "fg1000");
|
||||
io.load_nasal(nasal_dir ~ page ~ '/' ~ page ~ 'Options.nas', "fg1000");
|
||||
io.load_nasal(nasal_dir ~ page ~ '/' ~ page ~ 'Controller.nas', "fg1000");
|
||||
io.load_nasal(nasal_dir ~ "MFDPages/" ~ page ~ '/' ~ page ~ '.nas', "fg1000");
|
||||
io.load_nasal(nasal_dir ~ "MFDPages/" ~ page ~ '/' ~ page ~ 'Styles.nas', "fg1000");
|
||||
io.load_nasal(nasal_dir ~ "MFDPages/" ~ page ~ '/' ~ page ~ 'Options.nas', "fg1000");
|
||||
io.load_nasal(nasal_dir ~ "MFDPages/" ~ page ~ '/' ~ page ~ 'Controller.nas', "fg1000");
|
||||
}
|
||||
|
||||
var MFD =
|
||||
|
@ -89,8 +93,12 @@ var MFD =
|
|||
# If we don't return anything the default font is used
|
||||
};
|
||||
|
||||
canvas.parsesvg(obj._svg,
|
||||
'/Aircraft/Instruments-3d/FG1000/MFDPages/EIS.svg',
|
||||
{'font-mapper': fontmapper});
|
||||
|
||||
foreach (var page; MFDPages) {
|
||||
var svg_file ='/Aircraft/Instruments-3d/FG1000/Models/' ~ page ~ '.svg';
|
||||
var svg_file ='/Aircraft/Instruments-3d/FG1000/MFDPages/' ~ page ~ '.svg';
|
||||
if (resolvepath(svg_file) != "") {
|
||||
# Load an SVG file if available.
|
||||
canvas.parsesvg(obj._svg,
|
||||
|
@ -99,10 +107,6 @@ var MFD =
|
|||
}
|
||||
}
|
||||
|
||||
canvas.parsesvg(obj._svg,
|
||||
'/Aircraft/Instruments-3d/FG1000/Models/MFD.svg',
|
||||
{'font-mapper': fontmapper});
|
||||
|
||||
obj._MFDDevice = canvas.PFD_Device.new(obj._svg, 12, "SoftKey", myCanvas, "MFD");
|
||||
obj._MFDDevice.device_id = device_id;
|
||||
obj._MFDDevice.RegisterWithEmesary();
|
||||
|
|
|
@ -84,7 +84,7 @@ var NavigationMapStyles =
|
|||
|
||||
me.Styles.APS = {};
|
||||
me.Styles.APS.scale_factor=0.3;
|
||||
me.Styles.APS.svg_path = "Aircraft/Instruments-3d/FG1000/Models/APSmodel.svg";
|
||||
me.Styles.APS.svg_path = "Aircraft/Instruments-3d/FG1000/Icons/APSmodel.svg";
|
||||
},
|
||||
|
||||
clearStyles : func() {
|