Index: code/trunk/src/ogreceguirenderer/OgreCEGUIRenderer.cpp
===================================================================
--- code/trunk/src/ogreceguirenderer/OgreCEGUIRenderer.cpp	(revision 2787)
+++ code/trunk/src/ogreceguirenderer/OgreCEGUIRenderer.cpp	(revision 2790)
@@ -3,5 +3,5 @@
 	created:	11/5/2004
 	author:		Paul D Turner
-	
+
 	purpose:	Implementation of Renderer class for Ogre engine
 *************************************************************************/
@@ -54,5 +54,5 @@
 	Utility function to create a render operation and vertex buffer to render quads
 *************************************************************************/
-static void createQuadRenderOp(Ogre::RenderOperation &d_render_op, 
+static void createQuadRenderOp(Ogre::RenderOperation &d_render_op,
     Ogre::HardwareVertexBufferSharedPtr &d_buffer, size_t nquads)
 {
@@ -72,5 +72,5 @@
 
 	// create hardware vertex buffer
-	d_buffer = HardwareBufferManager::getSingleton().createVertexBuffer(vd->getVertexSize(0), nquads,  
+	d_buffer = HardwareBufferManager::getSingleton().createVertexBuffer(vd->getVertexSize(0), nquads,
         HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY_DISCARDABLE, false);
 
@@ -83,5 +83,5 @@
 }
 
-static void destroyQuadRenderOp(Ogre::RenderOperation &d_render_op, 
+static void destroyQuadRenderOp(Ogre::RenderOperation &d_render_op,
     Ogre::HardwareVertexBufferSharedPtr &d_buffer)
 {
@@ -146,5 +146,5 @@
 		d_sorted = false;
 		QuadInfo quad;
-		
+
 		// set quad position, flipping y co-ordinates, and applying appropriate texel origin offset
 		quad.position.d_left	= dest_rect.d_left;
@@ -170,5 +170,5 @@
 		quad.bottomLeftCol	= colourToOgre(colours.d_top_left);
 		quad.bottomRightCol	= colourToOgre(colours.d_top_right);
-		
+
 		// set quad split mode
 		quad.splitMode = quad_split_mode;
@@ -229,7 +229,7 @@
                 buffmem->tv1 = quad.texPosition.d_bottom;
                 ++buffmem;
-    
+
                 // setup Vertex 2...
-                
+
                 // top-left to bottom-right diagonal
                 if (quad.splitMode == TopLeftToBottomRight)
@@ -253,5 +253,5 @@
                 }
                 ++buffmem;
-    
+
                 // setup Vertex 3...
                 buffmem->x = quad.position.d_left;
@@ -262,5 +262,5 @@
                 buffmem->tv1 = quad.texPosition.d_top;
                 ++buffmem;
-    
+
                 // setup Vertex 4...
                 buffmem->x = quad.position.d_right;
@@ -271,5 +271,5 @@
                 buffmem->tv1 = quad.texPosition.d_bottom;
                 ++buffmem;
-    
+
                 // setup Vertex 5...
                 buffmem->x = quad.position.d_right;
@@ -280,7 +280,7 @@
                 buffmem->tv1 = quad.texPosition.d_top;
                 ++buffmem;
-    
+
                 // setup Vertex 6...
-                
+
                 // top-left to bottom-right diagonal
                 if (quad.splitMode == TopLeftToBottomRight)
@@ -305,9 +305,9 @@
                 ++buffmem;
             }
-    
+
             // ensure we leave the buffer in the unlocked state
             d_buffer->unlock();
         }
-        
+
         /// Render the buffer
         d_bufferPos = 0;
@@ -318,5 +318,5 @@
         while(i != d_quadlist.end())
         {
-            
+
             d_currTexture = i->texture;
             d_render_op.vertexData->vertexStart = d_bufferPos;
@@ -426,5 +426,5 @@
 
 /*************************************************************************
-	setup states etc	
+	setup states etc
 *************************************************************************/
 void OgreCEGUIRenderer::initRenderStates(void)
@@ -469,7 +469,7 @@
 
 
- 
-/*************************************************************************
-	sort quads list according to texture	
+
+/*************************************************************************
+	sort quads list according to texture
 *************************************************************************/
 void OgreCEGUIRenderer::sortQuads(void)
@@ -525,5 +525,5 @@
 
 		// setup Vertex 2...
-		
+
 		// top-left to bottom-right diagonal
 		if (quad_split_mode == TopLeftToBottomRight)
@@ -577,5 +577,5 @@
 
 		// setup Vertex 6...
-		
+
 		// top-left to bottom-right diagonal
 		if (quad_split_mode == TopLeftToBottomRight)
@@ -614,5 +614,5 @@
 /*************************************************************************
 	convert ARGB colour value to whatever the Ogre render system is
-	expecting.	
+	expecting.
 *************************************************************************/
 uint32 OgreCEGUIRenderer::colourToOgre(const colour& col) const
@@ -628,5 +628,5 @@
 
 /*************************************************************************
-	Set the scene manager to be used for rendering the GUI.	
+	Set the scene manager to be used for rendering the GUI.
 *************************************************************************/
 void OgreCEGUIRenderer::setTargetSceneManager(Ogre::SceneManager* scene_manager)
@@ -650,5 +650,5 @@
 
 /*************************************************************************
-	Set the target render queue for GUI rendering.	
+	Set the target render queue for GUI rendering.
 *************************************************************************/
 void OgreCEGUIRenderer::setTargetRenderQueue(Ogre::uint8 queue_id, bool post_queue)
@@ -724,5 +724,5 @@
 
 /*************************************************************************
-	Create a texture from an existing Ogre::TexturePtr object	
+	Create a texture from an existing Ogre::TexturePtr object
 *************************************************************************/
 Texture* OgreCEGUIRenderer::createTexture(Ogre::TexturePtr& texture)
@@ -749,5 +749,5 @@
 
 /*************************************************************************
-Set the size of the display in pixels.	
+Set the size of the display in pixels.
 *************************************************************************/
 void OgreCEGUIRenderer::setDisplaySize(const Size& sz)
@@ -767,5 +767,5 @@
 	is rendered
 *************************************************************************/
-void CEGUIRQListener::renderQueueStarted(Ogre::uint8 id, const Ogre::String& invocation, 
+void CEGUIRQListener::renderQueueStarted(Ogre::uint8 id, const Ogre::String& invocation,
 										 bool& skipThisQueue)
 {
Index: code/trunk/src/orxonox/gamestates/GSGUI.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSGUI.cc	(revision 2787)
+++ code/trunk/src/orxonox/gamestates/GSGUI.cc	(revision 2790)
@@ -51,4 +51,5 @@
 
         // show main menu
+        guiManager_->loadScene("MainMenu");
         guiManager_->showGUI("MainMenu", 0);
         getParent()->getViewport()->setCamera(guiManager_->getCamera());
Index: code/trunk/src/orxonox/gamestates/GSLevel.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSLevel.h	(revision 2787)
+++ code/trunk/src/orxonox/gamestates/GSLevel.h	(revision 2790)
@@ -43,4 +43,7 @@
         ~GSLevel();
 
+        // was private before (is public now because of console command in GSStandalone)
+        void setConfigValues();
+
     protected:
         void enter(Ogre::Viewport* viewport);
@@ -71,7 +74,4 @@
         ConsoleCommand*       ccTkeybind_;
 
-    private:
-        void setConfigValues();
-
     };
 }
Index: code/trunk/src/orxonox/gamestates/GSStandalone.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSStandalone.cc	(revision 2787)
+++ code/trunk/src/orxonox/gamestates/GSStandalone.cc	(revision 2790)
@@ -30,8 +30,16 @@
 #include "GSStandalone.h"
 
+#include <OgreViewport.h>
+#include <OgreCamera.h>
 #include "core/Core.h"
+#include "core/ConsoleCommand.h"
+#include "gui/GUIManager.h"
 
 namespace orxonox
 {
+    SetConsoleCommand(GSStandalone, showGUI, true).setAsInputCommand();
+
+    bool GSStandalone::guiShowing_s = false;
+
     GSStandalone::GSStandalone()
         : GameState<GSGraphics>("standalone")
@@ -43,4 +51,9 @@
     }
 
+    void GSStandalone::showGUI()
+    {
+        GSStandalone::guiShowing_s = true;
+    }
+
     void GSStandalone::enter()
     {
@@ -48,4 +61,8 @@
 
         GSLevel::enter(this->getParent()->getViewport());
+
+        guiManager_ = getParent()->getGUIManager();
+        // not sure if necessary
+        // guiManager_->loadScene("IngameMenu");
     }
 
@@ -59,4 +76,16 @@
     void GSStandalone::ticked(const Clock& time)
     {
+        if (guiShowing_s)
+        {
+            guiManager_->showGUI("IngameMenu", this->getParent()->getViewport()->getCamera()->getSceneManager());
+        }
+        else
+        {
+            if (guiManager_)
+                guiManager_->hideGUI();
+        }
+        // tick CEGUI
+        guiManager_->tick(time.getDeltaTime());
+
         GSLevel::ticked(time);
         this->tickChild(time);
Index: code/trunk/src/orxonox/gamestates/GSStandalone.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSStandalone.h	(revision 2787)
+++ code/trunk/src/orxonox/gamestates/GSStandalone.h	(revision 2790)
@@ -41,4 +41,5 @@
         GSStandalone();
         ~GSStandalone();
+        static void showGUI();
 
     private:
@@ -46,4 +47,7 @@
         void leave();
         void ticked(const Clock& time);
+
+        GUIManager*     guiManager_;
+        static bool     guiShowing_s;
     };
 }
Index: code/trunk/src/orxonox/gui/GUIManager.cc
===================================================================
--- code/trunk/src/orxonox/gui/GUIManager.cc	(revision 2787)
+++ code/trunk/src/orxonox/gui/GUIManager.cc	(revision 2790)
@@ -172,5 +172,5 @@
 
                 // load the background scene
-                loadScenes();
+                //loadScenes();
                 //CEGUI::KeyEventArgs e;
                 //e.codepoint
@@ -190,4 +190,34 @@
 
         return true;
+    }
+
+    void GUIManager::loadScene(const std::string& name)
+    {
+        if (name.compare("IngameMenu") == 0)
+        {
+            try
+            {
+                /*this->scriptModule_ = new LuaScriptModule();
+                this->luaState_ = this->scriptModule_->getLuaState();
+                this->guiSystem_ = new System(this->guiRenderer_, this->resourceProvider_, 0, this->scriptModule_);
+                tolua_Core_open(this->scriptModule_->getLuaState());
+                tolua_Orxonox_open(this->scriptModule_->getLuaState());
+                */
+                this->scriptModule_->executeScriptFile("ingameGUI.lua", "GUI");
+            }
+            catch (CEGUI::Exception& ex)
+            {
+#if CEGUI_VERSION_MINOR < 6
+                throw GeneralException(ex.getMessage().c_str());
+#else
+                throw GeneralException(ex.getMessage().c_str(), ex.getLine(),
+                                       ex.getFileName().c_str(), ex.getName().c_str());
+#endif
+            }
+        }
+        else
+        {
+            loadScenes();
+        }
     }
 
@@ -241,4 +271,5 @@
             try
             {
+                COUT (0) << "************* sceneManager: " << sceneManager << std::endl;
                 if (!sceneManager)
                 {
@@ -287,5 +318,6 @@
             return;
         //this->viewport_->setCamera(0);
-        this->guiRenderer_->setTargetSceneManager(0);
+        // has no effect since you cannot assign 0 as SceneManager
+        //this->guiRenderer_->setTargetSceneManager(0);
         this->state_ = Ready;
         InputManager::getInstance().requestLeaveState("gui");
Index: code/trunk/src/orxonox/gui/GUIManager.h
===================================================================
--- code/trunk/src/orxonox/gui/GUIManager.h	(revision 2787)
+++ code/trunk/src/orxonox/gui/GUIManager.h	(revision 2790)
@@ -70,4 +70,5 @@
 
         bool initialise(Ogre::RenderWindow* renderWindow);
+        void loadScene(const std::string& name);
         void tick(float dt)
         {
