Index: code/branches/usability/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/usability/src/libraries/core/GUIManager.cc	(revision 8033)
+++ code/branches/usability/src/libraries/core/GUIManager.cc	(revision 8035)
@@ -103,7 +103,17 @@
     /*static*/ const std::string GUIManager::defaultScheme_ = "TaharezGreen";
 
+    static const std::string __CC_navigateGUI_name = "navigateGUI";
+
     SetConsoleCommand("showGUI", &GUIManager::showGUI).defaultValue(1, false).defaultValue(2, false);
     SetConsoleCommand("hideGUI", &GUIManager::hideGUI);
     SetConsoleCommand("toggleGUI", &GUIManager::toggleGUI).defaultValue(1, false).defaultValue(2, false);
+    SetConsoleCommand(__CC_navigateGUI_name, &GUIManager::navigateGUI).deactivate();
+
+    //! Strings that specify modes for the GUI navigation.
+    /*static*/ const std::string GUIManager::NAVIGATE_UP = "up";
+    /*static*/ const std::string GUIManager::NAVIGATE_DOWN = "down";
+    /*static*/ const std::string GUIManager::NAVIGATE_LEFT = "left";
+    /*static*/ const std::string GUIManager::NAVIGATE_RIGHT = "right";
+    /*static*/ const std::string GUIManager::NAVIGATE_ENTER = "enter";
 
     /**
@@ -364,4 +374,41 @@
             this->rootWindow_->setProperty("Alpha", "1.0");
         this->rootWindow_->setProperty("Image", image);
+    }
+
+    /**
+    @brief
+        Method to navigate the GUI, by specifying the mode of navigation.
+    @param mode
+        The mode of navigation, at this point can be either 'up', 'down', 'left', 'right' or 'enter'.
+    */
+    /*static*/ void GUIManager::navigateGUI(const std::string& mode)
+    {
+        if(mode == NAVIGATE_UP)
+            GUIManager::getInstance().executeCode("navigateGUI(\"" + NAVIGATE_UP + "\")");
+        else if(mode == NAVIGATE_DOWN)
+            GUIManager::getInstance().executeCode("navigateGUI(\"" + NAVIGATE_DOWN + "\")");
+        else if(mode == NAVIGATE_LEFT)
+            GUIManager::getInstance().executeCode("navigateGUI(\"" + NAVIGATE_LEFT + "\")");
+        else if(mode == NAVIGATE_RIGHT)
+            GUIManager::getInstance().executeCode("navigateGUI(\"" + NAVIGATE_RIGHT + "\")");
+        else if(mode == NAVIGATE_ENTER)
+            GUIManager::getInstance().executeCode("navigateGUI(\"" + NAVIGATE_ENTER + "\")");
+    }
+
+    /**
+    @brief
+        Is called by lua to change whether there are any GUIs active at the moment.
+    @param active
+        Whether GUIs are active.
+    */
+    void GUIManager::guisActiveChanged(bool active)
+    {
+        if(this->GUIsActive_ == active)
+            return;
+        this->GUIsActive_ = active;
+        if(this->GUIsActive_)
+            ModifyConsoleCommand(__CC_navigateGUI_name).activate();
+        else
+            ModifyConsoleCommand(__CC_navigateGUI_name).deactivate();
     }
 
Index: code/branches/usability/src/libraries/core/GUIManager.h
===================================================================
--- code/branches/usability/src/libraries/core/GUIManager.h	(revision 8033)
+++ code/branches/usability/src/libraries/core/GUIManager.h	(revision 8035)
@@ -94,4 +94,7 @@
         void setBackgroundImage(const std::string& image);
 
+        static void navigateGUI(const std::string& mode);
+        void guisActiveChanged(bool active); // tolua_export
+
         //! 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
@@ -124,4 +127,12 @@
         template <typename FunctionType>
         bool protectedCall(FunctionType function);
+
+        static const std::string NAVIGATE_UP;
+        static const std::string NAVIGATE_DOWN;
+        static const std::string NAVIGATE_LEFT;
+        static const std::string NAVIGATE_RIGHT;
+        static const std::string NAVIGATE_ENTER;
+
+        bool GUIsActive_; //!< Whether there are any GUIs active at a given moment.
 
         // keyHandler functions
