From 30bf47f75363447f54d04c2fe20e20308373f657 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Fri, 28 Sep 2018 22:12:42 -0400 Subject: [PATCH 1/2] Sim: Add MCDU dialogs! --- A320-main.xml | 18 + Models/Instruments/MCDU/MCDU.nas | 8 +- Models/Instruments/MCDU/MCDU1.xml | 15 +- Models/Instruments/MCDU/MCDU2.xml | 15 +- Systems/mcdu1-dlg.xml | 1322 +++++++++++++++++++++++++++++ Systems/mcdu2-dlg.xml | 1322 +++++++++++++++++++++++++++++ revision.txt | 2 +- 7 files changed, 2695 insertions(+), 7 deletions(-) create mode 100644 Systems/mcdu1-dlg.xml create mode 100644 Systems/mcdu2-dlg.xml diff --git a/A320-main.xml b/A320-main.xml index 336ec80f..649dd032 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -328,6 +328,24 @@ + + + + nasal + + + + + + + nasal + + + diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 3efd934f..2dde783d 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -1741,13 +1741,13 @@ var MCDU_update_fast = maketimer(0.125, func { }); var showMCDU1 = func { - var dlg = canvas.Window.new([512, 432], "dialog").set("resize", 1); - dlg.setCanvas(MCDU1_display); + var mcdu1_dlg = gui.Dialog.new("sim/gui/dialogs/mcdu1/dialog", "Aircraft/IDG-A32X/Systems/mcdu1-dlg.xml"); + mcdu1_dlg.open(); } var showMCDU2 = func { - var dlg = canvas.Window.new([512, 432], "dialog").set("resize", 1); - dlg.setCanvas(MCDU2_display); + var mcdu2_dlg = gui.Dialog.new("sim/gui/dialogs/mcdu2/dialog", "Aircraft/IDG-A32X/Systems/mcdu2-dlg.xml"); + mcdu2_dlg.open(); } setlistener("/MCDU[0]/page", func { diff --git a/Models/Instruments/MCDU/MCDU1.xml b/Models/Instruments/MCDU/MCDU1.xml index feaa9c6d..551db650 100644 --- a/Models/Instruments/MCDU/MCDU1.xml +++ b/Models/Instruments/MCDU/MCDU1.xml @@ -9,7 +9,20 @@ res/MCDU1.ac - + + + pick + mcdu1.screen + + + false + + nasal + + + + + pick radnav diff --git a/Models/Instruments/MCDU/MCDU2.xml b/Models/Instruments/MCDU/MCDU2.xml index d8e7d13d..3dfb0167 100644 --- a/Models/Instruments/MCDU/MCDU2.xml +++ b/Models/Instruments/MCDU/MCDU2.xml @@ -9,7 +9,20 @@ res/MCDU2.ac - + + + pick + mcdu2.screen + + + false + + nasal + + + + + pick radnav diff --git a/Systems/mcdu1-dlg.xml b/Systems/mcdu1-dlg.xml new file mode 100644 index 00000000..e3d6d50e --- /dev/null +++ b/Systems/mcdu1-dlg.xml @@ -0,0 +1,1322 @@ + + + + + + + mcdu1 + table + 0 + 0 + + + 0 + 0 + hbox + + left + + + + + + + 1 + 0 + + + + 2 + 0 + hbox + + + vbox + + + + + + + + + + + + + + + + + + + + + + + + mcdu1 + fill + fill + false + 251 + 216 + + + + + + + + + + + + vbox + + + + + + + + + + + + + + + + + + + + + + + + + 3 + 0 + hbox + + + + + + + + + + + + + + + + + + 4 + 0 + hbox + + + + + + + + + + + + + + + + + + 5 + 0 + hbox + + + vbox + + + table + + + + + + + + + + + + + + + + table + + + + + + + + + + + + + + + + + + + + + + + + + + + + + table + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Systems/mcdu2-dlg.xml b/Systems/mcdu2-dlg.xml new file mode 100644 index 00000000..fbbd8786 --- /dev/null +++ b/Systems/mcdu2-dlg.xml @@ -0,0 +1,1322 @@ + + + + + + + mcdu2 + table + 0 + 0 + + + 0 + 0 + hbox + + left + + + + + + + 1 + 0 + + + + 2 + 0 + hbox + + + vbox + + + + + + + + + + + + + + + + + + + + + + + + mcdu2 + fill + fill + false + 251 + 216 + + + + + + + + + + + + vbox + + + + + + + + + + + + + + + + + + + + + + + + + 3 + 0 + hbox + + + + + + + + + + + + + + + + + + 4 + 0 + hbox + + + + + + + + + + + + + + + + + + 5 + 0 + hbox + + + vbox + + + table + + + + + + + + + + + + + + + + table + + + + + + + + + + + + + + + + + + + + + + + + + + + + + table + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/revision.txt b/revision.txt index 4c7368f7..36aa6d66 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -4661 \ No newline at end of file +4662 \ No newline at end of file From 982d689be7cdcea463a2288cf92d97cc02829b76 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Fri, 28 Sep 2018 22:23:50 -0400 Subject: [PATCH 2/2] MCDU: Make MCDU popup dialogs work in MCDU reworked nasal --- Systems/mcdu1-dlg.xml | 142 +++++++++++++++++++++--------------------- Systems/mcdu2-dlg.xml | 142 +++++++++++++++++++++--------------------- 2 files changed, 142 insertions(+), 142 deletions(-) diff --git a/Systems/mcdu1-dlg.xml b/Systems/mcdu1-dlg.xml index e3d6d50e..f0c6388f 100644 --- a/Systems/mcdu1-dlg.xml +++ b/Systems/mcdu1-dlg.xml @@ -56,7 +56,7 @@ 30 nasal - + systems/electrical/bus/ac1 @@ -72,7 +72,7 @@ 30 nasal - + systems/electrical/bus/ac1 @@ -88,7 +88,7 @@ 30 nasal - + systems/electrical/bus/ac1 @@ -104,7 +104,7 @@ 30 nasal - + systems/electrical/bus/ac1 @@ -120,7 +120,7 @@ 30 nasal - + systems/electrical/bus/ac1 @@ -136,7 +136,7 @@ 30 nasal - + systems/electrical/bus/ac1 @@ -152,7 +152,7 @@ - mcdu1 + mcdu fill fill false @@ -161,17 +161,17 @@ @@ -191,7 +191,7 @@ 30 nasal - + systems/electrical/bus/ac1 @@ -207,7 +207,7 @@ 30 nasal - + systems/electrical/bus/ac1 @@ -223,7 +223,7 @@ 30 nasal - + systems/electrical/bus/ac1 @@ -239,7 +239,7 @@ 30 nasal - + systems/electrical/bus/ac1 @@ -255,7 +255,7 @@ 30 nasal - + systems/electrical/bus/ac1 @@ -271,7 +271,7 @@ 30 nasal - + systems/electrical/bus/ac1 @@ -310,7 +310,7 @@ 40 nasal - + systems/electrical/bus/ac1 @@ -326,7 +326,7 @@ 40 nasal - + systems/electrical/bus/ac1 @@ -342,7 +342,7 @@ 40 nasal - + systems/electrical/bus/ac1 @@ -376,7 +376,7 @@ 40 nasal - + systems/electrical/bus/ac1 @@ -392,7 +392,7 @@ 40 nasal - + systems/electrical/bus/ac1 @@ -408,7 +408,7 @@ 40 nasal - + systems/electrical/bus/ac1 @@ -436,7 +436,7 @@ 40 nasal - + systems/electrical/bus/ac1 @@ -480,7 +480,7 @@ 40 nasal - + systems/electrical/bus/ac1 @@ -498,7 +498,7 @@ 40 nasal - + systems/electrical/bus/ac1 @@ -524,7 +524,7 @@ 40 nasal - + systems/electrical/bus/ac1 @@ -542,7 +542,7 @@ 40 nasal - + systems/electrical/bus/ac1 @@ -564,7 +564,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -582,7 +582,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -600,7 +600,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -618,7 +618,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -636,7 +636,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -654,7 +654,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -672,7 +672,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -690,7 +690,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -708,7 +708,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -726,7 +726,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -744,7 +744,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -762,7 +762,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -785,7 +785,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -803,7 +803,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -821,7 +821,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -839,7 +839,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -857,7 +857,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -875,7 +875,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -893,7 +893,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -911,7 +911,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -929,7 +929,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -947,7 +947,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -965,7 +965,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -983,7 +983,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -1001,7 +1001,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -1019,7 +1019,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -1037,7 +1037,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -1055,7 +1055,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -1073,7 +1073,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -1091,7 +1091,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -1109,7 +1109,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -1127,7 +1127,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -1145,7 +1145,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -1163,7 +1163,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -1181,7 +1181,7 @@ 25 nasal - + systems/electrical/bus/ac1 @@ -1199,7 +1199,7 @@ 25