Index: /code/branches/ingamemenu/data/gui/scripts/InitialiseGUI.lua
===================================================================
--- /code/branches/ingamemenu/data/gui/scripts/InitialiseGUI.lua	(revision 6022)
+++ /code/branches/ingamemenu/data/gui/scripts/InitialiseGUI.lua	(revision 6023)
@@ -14,5 +14,9 @@
 
 loadedGUIs = {}
-root = nil;
+cursorVisibility = {}
+activeSheets = {}
+nrOfActiveSheets = 0
+root = nil
+bShowsCursor = false
 
 -- loads the GUI with the specified filename
@@ -36,6 +40,6 @@
 end
 
-function showGUI(filename, ptr)
-    gui = showGUI(filename)
+function showGUI(filename, bCursorVisible, ptr)
+    gui = showGUI(filename, bCursorVisible)
     gui.overlay = ptr
 end
@@ -43,5 +47,10 @@
 -- shows the specified and loads it if not loaded already
 -- be sure to set the global variable "filename" before calling this function
-function showGUI(filename)
+function showGUI(filename, bCursorVisible)
+--     bCursorVisibile=false
+    if bCursorVisible == nil then
+        cursorVisibility= true
+    end
+
     if root == nil then
         root = winMgr:createWindow("TaharezLook/StaticImage", "AbsoluteRootWindow")
@@ -61,4 +70,15 @@
     root:addChildWindow(currentGUI.window)
 
+    if bCursorVisible then
+        showCursor()
+    else
+        hideCursor()
+    end
+    cursorVisibility[filename]=bCursorVisible
+    
+    nrOfActiveSheets = nrOfActiveSheets + 1
+    table.insert(activeSheets, filename)
+    activeSheets[nrOfActiveSheets] = filename
+    
     currentGUI:show()
     showing = true
@@ -67,17 +87,45 @@
 
 function hideCursor()
-    cursor:hide()
+    if bShowsCursor==true then
+        bShowsCursor=false
+        cursor:hide()
+    end
 end
 
 function showCursor()
-    cursor:show()
+    if bShowsCursor==false then
+        bShowsCursor=true
+        cursor:show()
+    end
 end
 
 function hideGUI(filename)
     local currentGUI = loadedGUIs[filename]
-    if currentGUI ~= nil then
-        currentGUI:hide()
-        root:removeChildWindow(currentGUI.window)
-        showing = false
+    if currentGUI == nil then
+        return
     end
+    currentGUI:hide()
+    root:removeChildWindow(currentGUI.window)
+    showing = false
+    i=1
+    while activeSheets[i] do
+        if activeSheets[i+1] == nil then
+            if activeSheets[i-1] ~= nil then
+                if cursorVisibility[ activeSheets[i-1] ] == true then
+                    showCursor()
+                else
+                    hideCursor()
+                end
+            else
+                hideCursor()
+            end
+        end
+        if activeSheets[i] == filename then
+            table.remove( activeSheets, i )
+            nrOfActiveSheets = nrOfActiveSheets-1
+        else
+            i = i+1
+        end
+    end
+    cursorVisibility[filename] = nil -- remove the cursor visibility of the current gui from the table
 end
Index: /code/branches/ingamemenu/src/libraries/core/GUIManager.cc
===================================================================
--- /code/branches/ingamemenu/src/libraries/core/GUIManager.cc	(revision 6022)
+++ /code/branches/ingamemenu/src/libraries/core/GUIManager.cc	(revision 6023)
@@ -50,4 +50,5 @@
 
 #include "util/Clock.h"
+#include "util/Convert.h"
 #include "util/Debug.h"
 #include "util/Exception.h"
@@ -88,5 +89,5 @@
     GUIManager* GUIManager::singletonPtr_s = 0;
 
-    SetConsoleCommandShortcut(GUIManager, showGUI).accessLevel(AccessLevel::User);
+    SetConsoleCommandShortcut(GUIManager, showGUI).accessLevel(AccessLevel::User).defaultValue(1, true);
     SetConsoleCommandShortcut(GUIManager, hideGUI).accessLevel(AccessLevel::User);
 
@@ -209,5 +210,5 @@
         For more details check out loadGUI_2.lua where the function presides.
     */
-    /*static*/ void GUIManager::showGUI(const std::string& name)
+    /*static*/ void GUIManager::showGUI(const std::string& name, bool showCursor)
     {
         std::pair<std::set<std::string>::iterator,bool> result = GUIManager::getInstance().showingGUIs_.insert(name);
@@ -216,8 +217,8 @@
         if(GUIManager::getInstance().showingGUIs_.size() == 1 && result.second == true) //!< If it's the first GUI.
         {
-            GUIManager::getInstance().executeCode("showCursor()");
+//             GUIManager::getInstance().executeCode("showCursor()");
             InputManager::getInstance().enterState("guiMouseOnly");
         }
-        GUIManager::getInstance().executeCode("showGUI(\"" + name + "\")");
+        GUIManager::getInstance().executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(showCursor) + ")");
     }
 
@@ -226,5 +227,5 @@
         Hack-ish. Needed for GUIOverlay.
     */
-    void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr)
+    void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool showCursor)
     {
         std::pair<std::set<std::string>::iterator,bool> result = this->showingGUIs_.insert(name);
@@ -236,5 +237,5 @@
             InputManager::getInstance().enterState("guiMouseOnly");
         }
-        this->executeCode("showGUI(\"" + name + "\", " + ptr + ")");
+        this->executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(showCursor) + ", " + ptr + ")");
     }
 
@@ -258,9 +259,4 @@
     }
 
-    /*static*/ void GUIManager::hideCursor()
-    {
-        GUIManager::getInstance().executeCode("hideCursor()");
-    }
-
     void GUIManager::keyPressed(const KeyEvent& evt)
     {
Index: /code/branches/ingamemenu/src/libraries/core/GUIManager.h
===================================================================
--- /code/branches/ingamemenu/src/libraries/core/GUIManager.h	(revision 6022)
+++ /code/branches/ingamemenu/src/libraries/core/GUIManager.h	(revision 6023)
@@ -68,8 +68,7 @@
         void update(const Clock& time); 
 
-        static void showGUI(const std::string& name);
-        void showGUIExtra(const std::string& name, const std::string& ptr);
+        static void showGUI(const std::string& name, bool showCursor=true);
+        void showGUIExtra(const std::string& name, const std::string& ptr, bool showCursor=true);
         static void hideGUI(const std::string& name);
-        static void hideCursor();
 
         void setCamera(Ogre::Camera* camera);
Index: /code/branches/ingamemenu/src/libraries/core/LuaState.cc
===================================================================
--- /code/branches/ingamemenu/src/libraries/core/LuaState.cc	(revision 6022)
+++ /code/branches/ingamemenu/src/libraries/core/LuaState.cc	(revision 6023)
@@ -164,5 +164,5 @@
             if (sourceFileInfo != NULL)
                 origin = " originating from " + sourceFileInfo_->filename;
-            COUT(2) << "Error in Lua-script" << origin << ": " << lua_tostring(luaState_, -1) << std::endl;
+            COUT(1) << "Error in Lua-script" << origin << ": " << lua_tostring(luaState_, -1) << std::endl;
             // return value is nil
             lua_pushnil(luaState_);
Index: /code/branches/ingamemenu/src/orxonox/gamestates/GSMainMenu.cc
===================================================================
--- /code/branches/ingamemenu/src/orxonox/gamestates/GSMainMenu.cc	(revision 6022)
+++ /code/branches/ingamemenu/src/orxonox/gamestates/GSMainMenu.cc	(revision 6023)
@@ -82,6 +82,5 @@
     {
         // show main menu
-        GUIManager::showGUI("MainMenu");
-        GUIManager::hideCursor();
+        GUIManager::getInstance().showGUI("MainMenu", false);
         GUIManager::getInstance().setCamera(this->camera_);
         GraphicsManager::getInstance().setCamera(this->camera_);
@@ -112,7 +111,7 @@
 
         InputManager::getInstance().leaveState("mainMenu");
-        GUIManager::hideGUI("MainMenu");
 
         GUIManager::getInstance().setCamera(0);
+        GUIManager::hideGUI("MainMenu");
         GraphicsManager::getInstance().setCamera(0);
     }
