[Orxonox-commit 345] r2958 - trunk/src/orxonox/overlays

dafrick at orxonox.net dafrick at orxonox.net
Sat May 9 22:08:46 CEST 2009


Author: dafrick
Date: 2009-05-09 22:08:45 +0200 (Sat, 09 May 2009)
New Revision: 2958

Modified:
   trunk/src/orxonox/overlays/GUIOverlay.cc
Log:
Changed some stuff to make it compile. Not sure it's 100% failsafe though.

Modified: trunk/src/orxonox/overlays/GUIOverlay.cc
===================================================================
--- trunk/src/orxonox/overlays/GUIOverlay.cc	2009-05-07 15:05:45 UTC (rev 2957)
+++ trunk/src/orxonox/overlays/GUIOverlay.cc	2009-05-09 20:08:45 UTC (rev 2958)
@@ -28,6 +28,9 @@
 
 #include "GUIOverlay.h"
 #include "OrxonoxStableHeaders.h"
+#include <string>
+#include <sstream>
+#include "core/input/InputManager.h"
 
 #include "../gui/GUIManager.h"
 
@@ -55,10 +58,25 @@
     {
         SUPER(GUIOverlay, changedVisibility);
 
+        COUT(1) << "Somethings happened!!!" << std::endl;
+
         if (this->isVisible())
-            GUIManager::getInstancePtr()->executeCode("showGUI(\"" + this->guiName_ + "\", " + this + ")");
+        {
+            std::string str;
+            std::stringstream out;
+            out << (long)this;
+            str = out.str();
+            COUT(1) << str << std::endl;
+            GUIManager::getInstancePtr()->executeCode("showCursor()");
+            InputManager::getInstance().requestEnterState("guiMouseOnly");
+            GUIManager::getInstancePtr()->executeCode("showGUI(\"" + this->guiName_ + "\", " + str + ")");
+        }
         else
+        {
             GUIManager::getInstancePtr()->executeCode("hideGUI(\"" + this->guiName_ + "\")");
+            GUIManager::getInstancePtr()->executeCode("hideCursor()");
+            InputManager::getInstance().requestLeaveState("guiMouseOnly");
+        }
     }
 
-}
\ No newline at end of file
+}




More information about the Orxonox-commit mailing list