From 59579aae9c6aba505241d3ddab57ec6c783f7d6f Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Sun, 5 Jun 2011 14:50:40 +0200 Subject: [PATCH 1/3] Environment: create on (disabled) terrainsampler-instance Only existing instances of the terrain-sampler can be enabled at runtime, so create at lease one of them. --- Environment/environment.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Environment/environment.xml b/Environment/environment.xml index 61e834fb9..87a4722ec 100644 --- a/Environment/environment.xml +++ b/Environment/environment.xml @@ -319,4 +319,11 @@ + + + + false + + + From f3ff41d3d464ced2c0732ed22407d53b8bcec117 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 5 Jun 2011 21:36:24 +0200 Subject: [PATCH 2/3] tutorial submodule, part #1: move existing sources into subdirectory (non-functional, moved original scripts only) --- Nasal/{ => tutorial}/tutorial.nas | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Nasal/{ => tutorial}/tutorial.nas (100%) diff --git a/Nasal/tutorial.nas b/Nasal/tutorial/tutorial.nas similarity index 100% rename from Nasal/tutorial.nas rename to Nasal/tutorial/tutorial.nas From c3f8c1478aa0530f01cf1eba1bf5830701787dde Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 5 Jun 2011 21:37:58 +0200 Subject: [PATCH 3/3] tutorial submodule, part #2: adapt script/GUI to load module on demand tutorial.nas is now loaded (only) when "Start Tutorial" button is pressed. --- Nasal/gui.nas | 9 +++++++++ Nasal/tutorial/tutorial.nas | 11 +---------- gui/dialogs/tutorial.xml | 5 ++++- preferences.xml | 20 +++++++++++++------- 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/Nasal/gui.nas b/Nasal/gui.nas index 2a5c74414..e0fa55d68 100644 --- a/Nasal/gui.nas +++ b/Nasal/gui.nas @@ -1265,3 +1265,12 @@ _setlistener("/sim/signals/screenshot", func { } }); +var do_welcome = 1; +_setlistener("/sim/signals/fdm-initialized", func { + var haveTutorials = size(props.globals.getNode("/sim/tutorials", 1).getChildren("tutorial")); + gui.menuEnable("tutorial-start", haveTutorials); + if (do_welcome and haveTutorials) + settimer(func { setprop("/sim/messages/copilot", "Welcome aboard! Need help? Use 'Help -> Tutorials'.");}, 5.0); + do_welcome = 0; +}); + diff --git a/Nasal/tutorial/tutorial.nas b/Nasal/tutorial/tutorial.nas index d72602671..67aceb08a 100644 --- a/Nasal/tutorial/tutorial.nas +++ b/Nasal/tutorial/tutorial.nas @@ -15,7 +15,6 @@ var step_start_time = nil; var step_iter_count = 0; # number or step loop iterations var last_step_time = nil; # for set_targets() eta calculation var audio_dir = nil; -var do_welcome = 1; # property nodes (to be initialized with listener) var markerN = nil; @@ -26,7 +25,7 @@ var last_messageN = nil; var step_countN = nil; var step_timeN = nil; -_setlistener("/sim/signals/nasal-dir-initialized", func { +_setlistener("/nasal/tutorial/loaded", func { markerN = props.globals.getNode("/sim/model/marker", 1); headingN = props.globals.getNode("/orientation/heading-deg", 1); slipN = props.globals.getNode("/orientation/side-slip-deg", 1); @@ -37,14 +36,6 @@ _setlistener("/sim/signals/nasal-dir-initialized", func { setlistener("/sim/crashed", stopTutorial); }); -_setlistener("/sim/signals/fdm-initialized", func { - var haveTutorials = size(props.globals.getNode("/sim/tutorials", 1).getChildren("tutorial")); - gui.menuEnable("tutorial-start", haveTutorials); - if (do_welcome and haveTutorials) - settimer(func { setprop("/sim/messages/copilot", "Welcome aboard! Need help? Use 'Help -> Tutorials'.");}, 5.0); - do_welcome = 0; -}); - var startTutorial = func { var name = getprop("/sim/tutorials/current-tutorial"); if (name == nil) { diff --git a/gui/dialogs/tutorial.xml b/gui/dialogs/tutorial.xml index b95154682..358a01903 100644 --- a/gui/dialogs/tutorial.xml +++ b/gui/dialogs/tutorial.xml @@ -131,7 +131,10 @@ true nasal - + dialog-close diff --git a/preferences.xml b/preferences.xml index cc5f58aa9..610776ce8 100644 --- a/preferences.xml +++ b/preferences.xml @@ -1189,43 +1189,49 @@ Started September 2000 by David Megginson, david@megginson.com - false + false 1000 fg_log.csv , - false + false Longitude /position/longitude-deg - false + false Latitude /position/latitude-deg - false + false Altitude /position/altitude-ft - false + false Roll /orientation/roll-deg - false + false Pitch /orientation/pitch-deg - false + false Heading /orientation/heading-deg + + + false + + +