Index: code/branches/presentation2/src/orxonox/gamestates/GSGraphics.cc
===================================================================
--- code/branches/presentation2/src/orxonox/gamestates/GSGraphics.cc	(revision 6149)
+++ code/branches/presentation2/src/orxonox/gamestates/GSGraphics.cc	(revision 6150)
@@ -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/presentation2/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- code/branches/presentation2/src/orxonox/gamestates/GSGraphics.h	(revision 6149)
+++ code/branches/presentation2/src/orxonox/gamestates/GSGraphics.h	(revision 6150)
@@ -57,6 +57,4 @@
         void update(const Clock& time);
 
-        void toggleGUI();
-
     private:
     };
Index: code/branches/presentation2/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/presentation2/src/orxonox/gamestates/GSLevel.cc	(revision 6149)
+++ code/branches/presentation2/src/orxonox/gamestates/GSLevel.cc	(revision 6150)
@@ -56,4 +56,5 @@
         , guiKeysOnlyInputState_(0)
         , startFile_(0)
+        , bShowIngameGUI_(false)
     {
     }
@@ -78,6 +79,4 @@
             guiKeysOnlyInputState_ = InputManager::getInstance().createInputState("guiKeysOnly");
             guiKeysOnlyInputState_->setKeyHandler(GUIManager::getInstancePtr());
-
-            CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSLevel::showIngameGUI, this), "showIngameGUI"));
         }
 
@@ -94,20 +93,4 @@
             // connect the HumanPlayer to the game
             PlayerManager::getInstance().clientConnected(0);
-        }
-    }
-
-    void GSLevel::showIngameGUI(bool show)
-    {
-        if (show)
-        {
-            GUIManager::getInstance().showGUI("inGameTest");
-            GUIManager::getInstance().executeCode("showCursor()");
-            InputManager::getInstance().enterState("guiMouseOnly");
-        }
-        else
-        {
-            GUIManager::getInstance().executeCode("hideGUI(\"inGameTest\")");
-            GUIManager::getInstance().executeCode("hideCursor()");
-            InputManager::getInstance().leaveState("guiMouseOnly");
         }
     }
Index: code/branches/presentation2/src/orxonox/gamestates/GSLevel.h
===================================================================
--- code/branches/presentation2/src/orxonox/gamestates/GSLevel.h	(revision 6149)
+++ code/branches/presentation2/src/orxonox/gamestates/GSLevel.h	(revision 6150)
@@ -52,5 +52,4 @@
         void loadLevel();
         void unloadLevel();
-        void showIngameGUI(bool show);
 
         InputState*              gameInputState_;          //!< input state for normal ingame playing
@@ -60,4 +59,5 @@
         XMLFile* startFile_;
         std::set<BaseObject*> staticObjects_;
+        bool bShowIngameGUI_;
     };
 }
Index: code/branches/presentation2/src/orxonox/gamestates/GSMainMenu.cc
===================================================================
--- code/branches/presentation2/src/orxonox/gamestates/GSMainMenu.cc	(revision 6149)
+++ code/branches/presentation2/src/orxonox/gamestates/GSMainMenu.cc	(revision 6150)
@@ -83,6 +83,8 @@
     {
         // show main menu
-        GUIManager::getInstance().showGUI("MainMenu");
+        GUIManager::getInstance().showGUI("MainMenu", true, false);
         GUIManager::getInstance().setCamera(this->camera_);
+        GUIManager::getInstance().setBackground("MainMenuBackground");
+//         GUIManager::getInstance().setBackground("");
         GraphicsManager::getInstance().setCamera(this->camera_);
 
@@ -118,4 +120,6 @@
 
         GUIManager::getInstance().setCamera(0);
+        GUIManager::getInstance().setBackground("");
+        GUIManager::hideGUI("MainMenu");
         GraphicsManager::getInstance().setCamera(0);
     }
Index: code/branches/presentation2/src/orxonox/pickup/PickupInventory.cc
===================================================================
--- code/branches/presentation2/src/orxonox/pickup/PickupInventory.cc	(revision 6149)
+++ code/branches/presentation2/src/orxonox/pickup/PickupInventory.cc	(revision 6150)
@@ -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/presentation2/src/orxonox/pickup/PickupSpawner.cc
===================================================================
--- code/branches/presentation2/src/orxonox/pickup/PickupSpawner.cc	(revision 6149)
+++ code/branches/presentation2/src/orxonox/pickup/PickupSpawner.cc	(revision 6150)
@@ -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();
     }
Index: code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc
===================================================================
--- code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc	(revision 6149)
+++ code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc	(revision 6150)
@@ -196,5 +196,5 @@
     }
 
-    void WeaponMode::computeMuzzleParameters()
+    void WeaponMode::computeMuzzleParameters(const Vector3& target)
     {
         if (this->weapon_)
@@ -204,10 +204,5 @@
             Pawn* pawn = this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn();
             Vector3 muzzleDirection;
-            if ( pawn->getTarget() )
-            {
-                muzzleDirection = pawn->getTarget()->getWorldPosition() - this->muzzlePosition_;
-            }
-            else
-                muzzleDirection = pawn->getAimPosition() - this->muzzlePosition_;
+            muzzleDirection = target - this->muzzlePosition_;
 //             COUT(0) << "muzzleDirection " << muzzleDirection << endl;
             this->muzzleOrientation_ = (this->weapon_->getWorldOrientation() * WorldEntity::FRONT).getRotationTo(muzzleDirection) * this->weapon_->getWorldOrientation();
Index: code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.h
===================================================================
--- code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.h	(revision 6149)
+++ code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.h	(revision 6150)
@@ -109,5 +109,5 @@
                 { return this->muzzleOffset_; }
 
-            void computeMuzzleParameters();
+            void computeMuzzleParameters(const Vector3& target);
             const Vector3& getMuzzlePosition() const
                 { return this->muzzlePosition_; }
