Index: code/branches/gamestates2/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/gamestates2/src/libraries/core/GUIManager.cc	(revision 6736)
+++ code/branches/gamestates2/src/libraries/core/GUIManager.cc	(revision 6737)
@@ -42,4 +42,5 @@
 #include <CEGUISystem.h>
 #include <CEGUIWindow.h>
+#include <CEGUIWindowManager.h>
 #include <ogreceguirenderer/OgreCEGUIRenderer.h>
 
@@ -147,10 +148,19 @@
         guiSystem_->injectMousePosition((float)mousePosition.first, (float)mousePosition.second);
 
-        // Hide the mouse cursor unless playing in full screen mode
-        if (!GraphicsManager::getInstance().isFullScreen())
-            CEGUI::MouseCursor::getSingleton().hide();
-
-        // Initialise the basic Lua code
+        // Initialise the Lua framework and load the schemes
         this->luaState_->doFile("InitialiseGUI.lua");
+
+        // Create the root nodes
+        this->rootWindow_ = CEGUI::WindowManager::getSingleton().createWindow("MenuWidgets/StaticImage", "AbsoluteRootWindow");
+        this->rootWindow_->setProperty("FrameEnabled", "False");
+        this->hudRootWindow_ = CEGUI::WindowManager::getSingleton().createWindow("DefaultWindow", "HUDRootWindow");
+        this->menuRootWindow_ = CEGUI::WindowManager::getSingleton().createWindow("DefaultWindow", "MenuRootWindow");
+        // And connect them
+        CEGUI::System::getSingleton().setGUISheet(this->rootWindow_);
+        this->rootWindow_->addChildWindow(this->hudRootWindow_);
+        this->rootWindow_->addChildWindow(this->menuRootWindow_);
+
+        // Set up the sheet manager in the Lua framework
+        this->luaState_->doFile("SheetManager.lua");
     }
 
@@ -203,6 +213,4 @@
     @param str
         reference to string object holding the Lua code which is to be executed
-
-        This function gives total access to the GUI. You can execute ANY Lua code here.
     */
     void GUIManager::executeCode(const std::string& str)
@@ -217,5 +225,5 @@
     void GUIManager::loadGUI(const std::string& name)
     {
-        this->executeCode("loadGUI(\"" + name + "\")");
+        this->executeCode("loadSheet(\"" + name + "\")");
     }
 
@@ -292,7 +300,19 @@
     }
 
-    void GUIManager::setBackground(const std::string& name)
-    {
-        this->executeCode("setBackground(\"" + name + "\")");
+    void GUIManager::setBackgroundImage(const std::string& imageSet, const std::string imageName)
+    {
+        if (imageSet.empty() || imageName.empty())
+            this->setBackgroundImage("set: " + imageSet + " image: " + imageName);
+        else
+            this->setBackgroundImage("");
+    }
+
+    void GUIManager::setBackgroundImage(const std::string& image)
+    {
+        if (image.empty())
+            this->rootWindow_->setProperty("Alpha", "0.0");
+        else
+            this->rootWindow_->setProperty("Alpha", "1.0");
+        this->rootWindow_->setProperty("Image", image);
     }
 
Index: code/branches/gamestates2/src/libraries/core/GUIManager.h
===================================================================
--- code/branches/gamestates2/src/libraries/core/GUIManager.h	(revision 6736)
+++ code/branches/gamestates2/src/libraries/core/GUIManager.h	(revision 6737)
@@ -79,7 +79,14 @@
         static void hideGUI(const std::string& name);
         void keyESC();
-        void setBackground(const std::string& name);
+        void setBackgroundImage(const std::string& imageSet, const std::string imageName); // tolua_export
+        void setBackgroundImage(const std::string& image);
 
+        //! Creates a new InputState to be used with a GUI Sheet
         const std::string& createInputState(const std::string& name, TriBool::Value showCursor = TriBool::True, TriBool::Value useKeyboard = TriBool::True, bool bBlockJoyStick = false); // tolua_export
+
+        //! Returns the root window for all menu sheets
+        CEGUI::Window* getMenuRootWindow() { return this->menuRootWindow_; } // tolua_export
+        //! Returns the root window for all HUD sheets
+        CEGUI::Window* getHUDRootWindow() { return this->hudRootWindow_; } // tolua_export
 
         void setCamera(Ogre::Camera* camera);
@@ -120,4 +127,7 @@
         CEGUI::ResourceProvider*             resourceProvider_; //!< CEGUI's resource provider
         CEGUI::Logger*                       ceguiLogger_;      //!< CEGUI's logger to be able to log CEGUI errors in our log
+        CEGUI::Window*                       rootWindow_;       //!< Root node for all windows
+        CEGUI::Window*                       hudRootWindow_;    //!< Root node for the HUD sheets
+        CEGUI::Window*                       menuRootWindow_;   //!< Root node for the menu sheets (used by Lua)
         std::map<std::string, PlayerInfo*>   players_;          //!< Stores the player (owner) for each GUI
         Ogre::Camera*                        camera_;           //!< Camera used to render the scene with the GUI
Index: code/branches/gamestates2/src/orxonox/overlays/GUISheet.cc
===================================================================
--- code/branches/gamestates2/src/orxonox/overlays/GUISheet.cc	(revision 6736)
+++ code/branches/gamestates2/src/orxonox/overlays/GUISheet.cc	(revision 6737)
@@ -40,6 +40,6 @@
         : BaseObject(creator)
         , bShowOnLoad_(false)
-        , bShowCursor_(true)
         , bHidePrevious_(false)
+        , bHidePreviousSet_(false)
     {
         RegisterObject(GUISheet);
@@ -57,32 +57,33 @@
         SUPER(GUISheet, XMLPort, xmlElement, mode);
 
-        XMLPortParam(GUISheet, "showOnLoad",   setShowOnLoad,       getShowOnLoad,       xmlElement, mode);
-        XMLPortParam(GUISheet, "showCursor",   setCursorVisibility, getCursorVisibility, xmlElement, mode);
-        XMLPortParam(GUISheet, "hidePrevious", setPreviousHiding,   getPreviousHiding,   xmlElement, mode);
-        XMLPortParam(GUISheet, "script",       setScript,           getScript,           xmlElement, mode);
+        XMLPortParam(GUISheet, "showOnLoad",   setShowOnLoad,     getShowOnLoad,     xmlElement, mode);
+        XMLPortParam(GUISheet, "hidePrevious", setPreviousHiding, getPreviousHiding, xmlElement, mode);
+        XMLPortParam(GUISheet, "sheetName",    setSheetName,      getSheetName,      xmlElement, mode);
+        XMLPortParam(GUISheet, "backgroundImage",  setBackgroundImage,  getBackgroundImage,  xmlElement, mode);
+
+        if (this->bShowOnLoad_)
+            this->show();
     }
 
     void GUISheet::show()
     {
-        GUIManager::showGUI(this->script_, this->bHidePrevious_);
+        GUIManager::getInstance().setBackgroundImage(this->backgroundImage_);
+        if (this->bHidePreviousSet_)
+            GUIManager::getInstance().showGUI(this->sheetName_, this->bHidePrevious_);
+        else
+            GUIManager::getInstance().showGUI(this->sheetName_);
     }
 
     void GUISheet::hide()
     {
-        GUIManager::hideGUI(this->script_);
+        GUIManager::getInstance().hideGUI(this->sheetName_);
+        if (!this->backgroundImage_.empty())
+            GUIManager::getInstance().setBackgroundImage("");
     }
 
-    void GUISheet::setScript(const std::string& filename)
+    void GUISheet::setSheetName(const std::string& name)
     {
-        this->script_ = filename;
-        GUIManager::getInstance().loadGUI(this->script_);
-        if (this->bShowOnLoad_)
-            this->show();
-    }
-
-    void GUISheet::setCursorVisibility(bool bShow)
-    {
-        this->bShowCursor_ = bShow;
-        // TODO: This call has no effect when already showing!
+        this->sheetName_ = name;
+        GUIManager::getInstance().loadGUI(this->sheetName_);
     }
 
@@ -90,5 +91,6 @@
     {
         this->bHidePrevious_ = bHide;
-        // TODO: This call has no effect when already showing!
+        this->bHidePreviousSet_ = true;
+        // Note: This call has no effect when already showing!
     }
 }
Index: code/branches/gamestates2/src/orxonox/overlays/GUISheet.h
===================================================================
--- code/branches/gamestates2/src/orxonox/overlays/GUISheet.h	(revision 6736)
+++ code/branches/gamestates2/src/orxonox/overlays/GUISheet.h	(revision 6737)
@@ -49,7 +49,7 @@
         void hide();
 
-        void setScript(const std::string& filename);
-        inline const std::string& getScript() const
-            { return this->script_; }
+        void setSheetName(const std::string& name);
+        inline const std::string& getSheetName() const
+            { return this->sheetName_; }
 
         inline void setShowOnLoad(bool bShow)
@@ -58,17 +58,19 @@
             { return this->bShowOnLoad_; }
 
-        void setCursorVisibility(bool bShow);
-        inline bool getCursorVisibility() const
-            { return this->bShowCursor_; }
-
         void setPreviousHiding(bool bHide);
         inline bool getPreviousHiding() const
             { return this->bHidePrevious_; }
 
+        void setBackgroundImage(const std::string& image)
+            { this->backgroundImage_ = image; }
+        inline const std::string& getBackgroundImage() const
+            { return this->backgroundImage_; }
+
     private:
-        std::string script_;
+        std::string sheetName_;
         bool bShowOnLoad_;
-        bool bShowCursor_;
         bool bHidePrevious_;
+        bool bHidePreviousSet_;
+        std::string backgroundImage_;
   };
 }
