]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_commands.cxx
Use the new clouds3d-enable property instead.
[flightgear.git] / src / Main / fg_commands.cxx
index 295a343f68c5752ee24f1e383418837748efe391..21a5b7d2a8f04e20fa4d7a1cc80ee053629ac959 100644 (file)
@@ -22,7 +22,7 @@
 #include <GUI/gui.h>
 #include <GUI/new_gui.hxx>
 #include <GUI/dialog.hxx>
-#include <Replay/replay.hxx>
+#include <Aircraft/replay.hxx>
 #include <Scenery/tilemgr.hxx>
 #if defined(HAVE_PLIB_PSL)
 #  include <Scripting/scriptmgr.hxx>
@@ -1106,6 +1106,18 @@ do_dialog_apply (const SGPropertyNode * arg)
 }
 
 
+/**
+ * Redraw GUI (applying new widget colors). Doesn't reload the dialogs,
+ * unlike reinit().
+ */
+static bool
+do_gui_redraw (const SGPropertyNode * arg)
+{
+    NewGUI * gui = (NewGUI *)globals->get_subsystem("gui");
+    gui->redraw();
+    return true;
+}
+
 /**
  * Built-in command: commit presets (read from in /sim/presets/)
  */
@@ -1153,7 +1165,7 @@ static bool
 do_replay (const SGPropertyNode * arg)
 {
     // freeze the master fdm
-    fgSetBool( "/sim/freeze/replay", true );
+    fgSetInt( "/sim/freeze/replay-state", 1 );
 
     FGReplay *r = (FGReplay *)(globals->get_subsystem( "replay" ));
 
@@ -1292,6 +1304,7 @@ do_save_xml_from_proptree(const SGPropertyNode * node)
     return true;
 }
 
+
 ////////////////////////////////////////////////////////////////////////
 // Command setup.
 ////////////////////////////////////////////////////////////////////////
@@ -1342,9 +1355,9 @@ static struct {
     { "dialog-new", do_dialog_new },
     { "dialog-show", do_dialog_show },
     { "dialog-close", do_dialog_close },
-    { "dialog-show", do_dialog_show },
     { "dialog-update", do_dialog_update },
     { "dialog-apply", do_dialog_apply },
+    { "gui-redraw", do_gui_redraw },
     { "presets-commit", do_presets_commit },
     { "log-level", do_log_level },
     { "replay", do_replay },