Index: code/branches/ingamemenu/data/gui/layouts/MainMenu.layout
===================================================================
--- code/branches/ingamemenu/data/gui/layouts/MainMenu.layout	(revision 6001)
+++ code/branches/ingamemenu/data/gui/layouts/MainMenu.layout	(revision 6003)
@@ -6,4 +6,5 @@
     <Property Name="FrameEnabled" Value="set:true"/>
     <Property Name="BackgroundEnabled" Value="set:false"/>
+    <Property Name="InheritsAlpha" Value="False" />
  
         <Window Type="TaharezLook/Button" Name="orxonox/StandaloneButton">
Index: code/branches/ingamemenu/data/gui/layouts/QuestGUI.layout
===================================================================
--- code/branches/ingamemenu/data/gui/layouts/QuestGUI.layout	(revision 6001)
+++ code/branches/ingamemenu/data/gui/layouts/QuestGUI.layout	(revision 6003)
@@ -6,4 +6,5 @@
     <Property Name="FrameEnabled" Value="set:true"/>
     <Property Name="BackgroundEnabled" Value="set:false"/>
+    <Property Name="InheritsAlpha" Value="False" />
 
         <Window Type="TaharezLook/Titlebar" Name="orxonox/QuestGUI/Title">
Index: code/branches/ingamemenu/data/gui/scripts/InitialiseGUI.lua
===================================================================
--- code/branches/ingamemenu/data/gui/scripts/InitialiseGUI.lua	(revision 6001)
+++ code/branches/ingamemenu/data/gui/scripts/InitialiseGUI.lua	(revision 6003)
@@ -14,4 +14,5 @@
 
 loadedGUIs = {}
+root = nil;
 
 -- loads the GUI with the specified filename
@@ -43,27 +44,24 @@
 -- be sure to set the global variable "filename" before calling this function
 function showGUI(filename)
-    if current == nil or current.filename ~= filename then
-        current = loadedGUIs[filename]
-        if current == nil then
-            current = loadGUI(filename)
-        end
-        system:setGUISheet(current.window)
+    if root == nil then
+        root = winMgr:createWindow("TaharezLook/StaticImage", "AbsoluteRootWindow")
+        root:setProperty("Alpha", "0.0")
+        root:setSize(CEGUI.UVector2(CEGUI.UDim(1.0,0),CEGUI.UDim(1.0,0)))
+        system:setGUISheet(root)
     end
-    current:show()
+
+    local currentGUI = loadedGUIs[filename]
+    if(currentGUI == nil) then
+        currentGUI = loadGUI(filename)
+    end
+
+    if(root:isChild(currentGUI.window)) then
+        root:removeChildWindow(currentGUI.window)
+    end
+    root:addChildWindow(currentGUI.window)
+
+    currentGUI:show()
     showing = true
-    return current
-end
-
-function toggleGUI()
-    if showing == true then
-        current:hide()
-        cursor:hide()
-        showing = false
-    else
-        current:show()
-        cursor:show()
-        showing = true
-    end
-    return showing
+    return currentGUI
 end
 
@@ -77,7 +75,8 @@
 
 function hideGUI(filename)
-    current = loadedGUIs[filename]
-    if current ~= nil then
-        current:hide()
+    local currentGUI = loadedGUIs[filename]
+    if currentGUI ~= nil then
+        currentGUI:hide()
+        root:removeChildWindow(currentGUI.window)
         showing = false
     end
Index: code/branches/ingamemenu/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/ingamemenu/src/libraries/core/GUIManager.cc	(revision 6001)
+++ code/branches/ingamemenu/src/libraries/core/GUIManager.cc	(revision 6003)
@@ -53,5 +53,7 @@
 #include "util/Exception.h"
 #include "util/OrxAssert.h"
+#include "ConsoleCommand.h"
 #include "Core.h"
+#include "input/InputManager.h"
 #include "LuaState.h"
 #include "PathConfig.h"
@@ -86,4 +88,7 @@
     GUIManager* GUIManager::singletonPtr_s = 0;
 
+    SetConsoleCommandShortcut(GUIManager, showGUI).accessLevel(AccessLevel::User);
+    SetConsoleCommandShortcut(GUIManager, hideGUI).accessLevel(AccessLevel::User);
+
     /**
     @brief
@@ -204,7 +209,51 @@
         For more details check out loadGUI_2.lua where the function presides.
     */
-    void GUIManager::showGUI(const std::string& name)
-    {
-        this->luaState_->doString("showGUI(\"" + name + "\")", rootFileInfo_);
+    /*static*/ void GUIManager::showGUI(const std::string& name)
+    {
+        std::pair<std::set<std::string>::iterator,bool> result = GUIManager::getInstance().showingGUIs_.insert(name);
+        if(result.second == false) //!< GUI already showing.
+            return;
+        if(GUIManager::getInstance().showingGUIs_.size() == 1 && result.second == true) //!< If it's the first GUI.
+        {
+            GUIManager::getInstance().executeCode("showCursor()");
+            InputManager::getInstance().enterState("guiMouseOnly");
+        }
+        GUIManager::getInstance().executeCode("showGUI(\"" + name + "\")");
+    }
+
+    /**
+    @brief
+        Hack-ish. Needed for GUIOverlay.
+    */
+    void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr)
+    {
+        std::pair<std::set<std::string>::iterator,bool> result = this->showingGUIs_.insert(name);
+        if(result.second == false) //!< GUI already showing.
+            return;
+        if(this->showingGUIs_.size() == 1 && result.second == true) //!< If it's the first GUI.
+        {
+            this->executeCode("showCursor()");
+            InputManager::getInstance().enterState("guiMouseOnly");
+        }
+        this->executeCode("showGUI(\"" + name + "\", " + ptr + ")");
+    }
+
+    /**
+    @brief
+        Hides specified GUI.
+    @param name
+        The name of the GUI.
+    */
+    /*static*/ void GUIManager::hideGUI(const std::string& name)
+    {
+        bool present = GUIManager::getInstance().showingGUIs_.erase(name);
+        if(!present) //!< If there was nothing to erase.
+            return;
+        GUIManager::getInstance().executeCode("hideGUI(\"" + name + "\")");
+        if(GUIManager::getInstance().showingGUIs_.size() == 0)
+        {
+            GUIManager::getInstance().executeCode("hideCursor()");
+            InputManager::getInstance().leaveState("guiMouseOnly");
+        }
     }
 
Index: code/branches/ingamemenu/src/libraries/core/GUIManager.h
===================================================================
--- code/branches/ingamemenu/src/libraries/core/GUIManager.h	(revision 6001)
+++ code/branches/ingamemenu/src/libraries/core/GUIManager.h	(revision 6003)
@@ -34,4 +34,5 @@
 
 #include <map>
+#include <set>
 #include <string>
 #include <CEGUIForwardRefs.h>
@@ -65,8 +66,9 @@
         ~GUIManager();
 
-        void update(const Clock& time);
+        void update(const Clock& time); 
 
-        void showGUI(const std::string& name);
-        void executeCode(const std::string& str);
+        static void showGUI(const std::string& name);
+        void showGUIExtra(const std::string& name, const std::string& ptr);
+        static void hideGUI(const std::string& name);
 
         void setCamera(Ogre::Camera* camera);
@@ -82,4 +84,8 @@
     private:
         GUIManager(const GUIManager& instance); //!< private and undefined copy c'tor (this is a singleton class)
+
+        std::set<std::string> showingGUIs_; //!< Keeps track of all the GUIs that are currently showing.
+
+        void executeCode(const std::string& str);
 
         // keyHandler functions
Index: code/branches/ingamemenu/src/modules/overlays/GUIOverlay.cc
===================================================================
--- code/branches/ingamemenu/src/modules/overlays/GUIOverlay.cc	(revision 6001)
+++ code/branches/ingamemenu/src/modules/overlays/GUIOverlay.cc	(revision 6003)
@@ -73,7 +73,6 @@
             out << reinterpret_cast<long>(this);
             str = out.str();
-            GUIManager::getInstance().executeCode("showCursor()");
-            InputManager::getInstance().enterState("guiMouseOnly");
-            GUIManager::getInstance().executeCode("showGUI(\"" + this->guiName_ + "\", " + str + ")");
+            COUT(1) << "GUIManager ptr: " << str << std::endl;
+            GUIManager::getInstance().showGUIExtra(this->guiName_, str);
 
             COUT(3) << "Showing GUI " << this->guiName_ << std::endl;
@@ -81,7 +80,5 @@
         else
         {
-            GUIManager::getInstance().executeCode("hideGUI(\"" + this->guiName_ + "\")");
-            GUIManager::getInstance().executeCode("hideCursor()");
-            InputManager::getInstance().leaveState("guiMouseOnly");
+            GUIManager::hideGUI(this->guiName_);
             COUT(3) << "Hiding GUI " << this->guiName_ << std::endl;
         }
Index: code/branches/ingamemenu/src/orxonox/gamestates/GSGraphics.cc
===================================================================
--- code/branches/ingamemenu/src/orxonox/gamestates/GSGraphics.cc	(revision 6001)
+++ code/branches/ingamemenu/src/orxonox/gamestates/GSGraphics.cc	(revision 6003)
@@ -64,6 +64,5 @@
     void GSGraphics::activate()
     {
-        // add console command to toggle GUI
-        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSGraphics::toggleGUI, this), "toggleGUI"));
+        
     }
 
@@ -78,16 +77,4 @@
     }
 
-    /**
-    @brief
-        Toggles the visibility of the current GUI
-
-        This function just executes a Lua function in the main script of the GUI by accessing the GUIManager.
-        For more details on this function check out the Lua code.
-    */
-    void GSGraphics::toggleGUI()
-    {
-        GUIManager::getInstance().executeCode("toggleGUI()");
-    }
-
     void GSGraphics::update(const Clock& time)
     {
Index: code/branches/ingamemenu/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- code/branches/ingamemenu/src/orxonox/gamestates/GSGraphics.h	(revision 6001)
+++ code/branches/ingamemenu/src/orxonox/gamestates/GSGraphics.h	(revision 6003)
@@ -57,6 +57,4 @@
         void update(const Clock& time);
 
-        void toggleGUI();
-
     private:
     };
Index: code/branches/ingamemenu/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/ingamemenu/src/orxonox/gamestates/GSLevel.cc	(revision 6001)
+++ code/branches/ingamemenu/src/orxonox/gamestates/GSLevel.cc	(revision 6003)
@@ -101,13 +101,9 @@
         if (show)
         {
-            GUIManager::getInstance().showGUI("inGameTest");
-            GUIManager::getInstance().executeCode("showCursor()");
-            InputManager::getInstance().enterState("guiMouseOnly");
+            GUIManager::showGUI("inGameTest");
         }
         else
         {
-            GUIManager::getInstance().executeCode("hideGUI(\"inGameTest\")");
-            GUIManager::getInstance().executeCode("hideCursor()");
-            InputManager::getInstance().leaveState("guiMouseOnly");
+            GUIManager::hideGUI("inGameTest");
         }
     }
Index: code/branches/ingamemenu/src/orxonox/gamestates/GSMainMenu.cc
===================================================================
--- code/branches/ingamemenu/src/orxonox/gamestates/GSMainMenu.cc	(revision 6001)
+++ code/branches/ingamemenu/src/orxonox/gamestates/GSMainMenu.cc	(revision 6003)
@@ -82,5 +82,5 @@
     {
         // show main menu
-        GUIManager::getInstance().showGUI("MainMenu");
+        GUIManager::showGUI("MainMenu");
         GUIManager::getInstance().setCamera(this->camera_);
         GraphicsManager::getInstance().setCamera(this->camera_);
@@ -111,4 +111,5 @@
 
         InputManager::getInstance().leaveState("mainMenu");
+        GUIManager::hideGUI("MainMenu");
 
         GUIManager::getInstance().setCamera(0);
Index: code/branches/ingamemenu/src/orxonox/pickup/PickupInventory.cc
===================================================================
--- code/branches/ingamemenu/src/orxonox/pickup/PickupInventory.cc	(revision 6001)
+++ code/branches/ingamemenu/src/orxonox/pickup/PickupInventory.cc	(revision 6003)
@@ -86,13 +86,9 @@
     {
         if(PickupInventory::getSingleton()->isVisible()) {
-            GUIManager::getInstance().executeCode("hideGUI(\"PickupInventory\")");
-            GUIManager::getInstance().executeCode("hideCursor()");
-            InputManager::getInstance().leaveState("guiMouseOnly");
-        }
-        else
-        {
-            GUIManager::getInstance().showGUI("PickupInventory");
-            GUIManager::getInstance().executeCode("showCursor()");
-            InputManager::getInstance().enterState("guiMouseOnly");
+            GUIManager::hideGUI("PickupInventory");
+        }
+        else
+        {
+            GUIManager::showGUI("PickupInventory");
         }
         PickupInventory::getSingleton()->setVisible(!PickupInventory::getSingleton()->isVisible());
Index: code/branches/ingamemenu/src/orxonox/pickup/PickupSpawner.cc
===================================================================
--- code/branches/ingamemenu/src/orxonox/pickup/PickupSpawner.cc	(revision 6001)
+++ code/branches/ingamemenu/src/orxonox/pickup/PickupSpawner.cc	(revision 6003)
@@ -96,6 +96,6 @@
         //  & load the GUI itself too, along with some empty windows
         //   = even less delays
-        GUIManager::getInstance().showGUI("PickupInventory");
-        GUIManager::getInstance().executeCode("hideGUI(\"PickupInventory\")");
+        GUIManager::showGUI("PickupInventory");
+        GUIManager::hideGUI("PickupInventory");
         PickupInventory::getSingleton();
     }
