Index: /code/trunk/src/orxonox/CMakeLists.txt
===================================================================
--- /code/trunk/src/orxonox/CMakeLists.txt	(revision 2962)
+++ /code/trunk/src/orxonox/CMakeLists.txt	(revision 2963)
@@ -35,5 +35,5 @@
 
 GENERATE_SOURCE_GROUPS(${ORXONOX_FILES})
-GENERATE_TOLUA_BINDINGS(Orxonox ORXONOX_FILES INPUTFILES gui/GUIManager.h)
+GENERATE_TOLUA_BINDINGS(Orxonox ORXONOX_FILES INPUTFILES gui/GUIManager.h objects/quest/QuestManager.h objects/quest/QuestDescription.h)
 
 # Not using precompiled header files: Avoid dependencies
Index: /code/trunk/src/orxonox/gui/GUIManager.cc
===================================================================
--- /code/trunk/src/orxonox/gui/GUIManager.cc	(revision 2962)
+++ /code/trunk/src/orxonox/gui/GUIManager.cc	(revision 2963)
@@ -242,4 +242,32 @@
     /**
     @brief
+        Registers a GUIOverlay with the GUIManager so that the GUIOverlay can be accessed by it's name through the GUIManager.
+    @param name
+        The name of the GUI.
+    @param overlay
+        A pointer to the GUIOverlay of the GUI.
+    @return
+        Returns false if the Overlay was already present.
+    */
+    bool GUIManager::registerOverlay(std::string name, GUIOverlay* overlay)
+    {
+        return (this->guiOverlays_.insert(std::pair<std::string, GUIOverlay*>(name, overlay))).second;
+    }
+
+    /**
+    @brief
+        Get the GUIOverlay of the GUI with the given name.
+    @param name
+        The name of the GUI.
+    @return
+        Returns a pointer to the GUIOverlay.
+    */
+    GUIOverlay* GUIManager::getOverlay(std::string name)
+    {
+        return (this->guiOverlays_.find(name))->second;
+    }
+
+    /**
+    @brief
         Tells the GUIManager which SceneManager to use
     @param camera
Index: /code/trunk/src/orxonox/objects/quest/Quest.cc
===================================================================
--- /code/trunk/src/orxonox/objects/quest/Quest.cc	(revision 2962)
+++ /code/trunk/src/orxonox/objects/quest/Quest.cc	(revision 2963)
@@ -197,15 +197,4 @@
     /**
     @brief
-        Returns the parentquest of the Quest.
-    @return
-        Returns a pointer to the parentquest of the Quest.
-    */
-    const Quest* Quest::getParentQuest(void)
-    {
-        return this->parentQuest_;
-    }
-
-    /**
-    @brief
         Returns the subquest at the given index.
     @param
Index: /code/trunk/src/orxonox/objects/quest/Quest.h
===================================================================
--- /code/trunk/src/orxonox/objects/quest/Quest.h	(revision 2962)
+++ /code/trunk/src/orxonox/objects/quest/Quest.h	(revision 2963)
@@ -118,5 +118,4 @@
             virtual bool isCompletable(const PlayerInfo* player) const = 0; //!< Checks whether the Quest can be completed.
 
-            const Quest* getParentQuest(void); //!< Returns the parentquest of the Quest.
             const Quest* getSubQuest(unsigned int index) const; //!<Returns the subquest at the given index.
             const QuestHint* getHint(unsigned int index) const; //!< Returns the QuestHint at the given index.
Index: /code/trunk/src/orxonox/objects/quest/QuestDescription.h
===================================================================
--- /code/trunk/src/orxonox/objects/quest/QuestDescription.h	(revision 2962)
+++ /code/trunk/src/orxonox/objects/quest/QuestDescription.h	(revision 2963)
@@ -42,4 +42,5 @@
 #include "core/XMLPort.h"
 
+// tolua_begin
 namespace orxonox
 {
@@ -55,6 +56,8 @@
         Damian 'Mozork' Frick
     */
-    class _OrxonoxExport QuestDescription : public BaseObject
-    {
+    class _OrxonoxExport QuestDescription
+// tolua_end
+        : public BaseObject
+    { // tolua_export
         public:
             QuestDescription(BaseObject* creator);
@@ -63,4 +66,5 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestDescription object through XML.
 
+// tolua_begin
             /**
             @brief Returns the title.
@@ -76,4 +80,5 @@
             inline const std::string & getDescription(void) const
                 { return this->description_; }
+// tolua_end
         
             /**
@@ -155,7 +160,7 @@
                 { this->completeMessage_ = message; }
 
-    };
+    }; // tolua_export
 
-}
+} // tolua_export
 
 #endif /* _QuestDescription_H__ */
Index: /code/trunk/src/orxonox/objects/quest/QuestManager.cc
===================================================================
--- /code/trunk/src/orxonox/objects/quest/QuestManager.cc	(revision 2962)
+++ /code/trunk/src/orxonox/objects/quest/QuestManager.cc	(revision 2963)
@@ -36,6 +36,10 @@
 
 #include "core/CoreIncludes.h"
+#include "core/ConsoleCommand.h"
+#include "core/input/InputManager.h"
+#include "util/Convert.h"
 
 #include "util/Exception.h"
+#include "gui/GUIManager.h"
 #include "Quest.h"
 #include "QuestHint.h"
@@ -44,5 +48,8 @@
 {
     //! Pointer to the current (and single) instance of this class.
-    QuestManager* QuestManager::singletonRef_s = NULL;
+    /*static*/ QuestManager* QuestManager::singletonRef_s = NULL;
+    /*static*/ bool QuestManager::GUIOpen = false;
+
+    SetConsoleCommand(QuestManager, toggleQuestGUI, true);
 
     /**
@@ -213,4 +220,152 @@
     }
 
+    QuestContainer* QuestManager::getQuestTree(std::string & name)
+    {
+        GUIOverlay* gui = GUIManager::getInstance().getOverlay(name);
+
+        PlayerInfo* player;
+        if(gui == NULL)
+        {
+            COUT(1) << "Something BAD happened." << std::endl;
+            return NULL;
+        }
+        COUT(1) << player << std::endl;
+        ConverterExplicit<BaseObject, PlayerInfo>::convert(player, *(gui->getOwner()));
+    
+        QuestContainer* root = NULL;
+        QuestContainer* current = NULL;
+        
+        std::list<Quest*>* pRootQuests = new std::list<Quest*>();
+        std::list<Quest*> rootQuests = *pRootQuests;
+        getRootQuests(player, rootQuests);
+        
+        for(std::list<Quest*>::iterator it = rootQuests.begin(); it != rootQuests.end(); it++)
+        {
+            Quest* quest = *it;
+            
+            QuestContainer* container = new QuestContainer;
+
+            container->description = quest->getDescription();
+            addHints(container, quest, player);
+            addSubQuests(container, quest, player);
+
+            if(root == NULL)
+            {
+                root = container;
+            }
+            else
+            {
+                current->next = container;
+            }
+            
+            current = container;
+
+        }
+        if(current != NULL)
+            current->next = NULL;
+
+        delete pRootQuests;
+
+        return root;
+    }
+
+    void QuestManager::getRootQuests(const PlayerInfo* player, std::list<Quest*> & list)
+    {
+        for(std::map<std::string, Quest*>::iterator it=this->questMap_.begin(); it!=this->questMap_.end(); it++)
+        {
+            Quest* quest = (*it).second;
+            if(quest->getParentQuest() == NULL && !quest->isInactive(player))
+            {
+                list.push_back(quest);
+            }
+        }
+    }
+
+    void QuestManager::addSubQuests(QuestContainer* container, Quest* quest, const PlayerInfo* player)
+    {
+        QuestContainer* current = NULL;
+        QuestContainer* first = NULL;
+
+        std::list<Quest*> quests = quest->getSubQuestList();
+        for(std::list<Quest*>::iterator it = quests.begin(); it != quests.end(); it++)
+        {
+            Quest* subQuest = *it;
+            if(!subQuest->isInactive(player))
+            {
+                QuestContainer* subQuestContainer = new QuestContainer;
+
+                subQuestContainer->description = subQuest->getDescription();
+                addHints(subQuestContainer, subQuest, player);
+                addSubQuests(subQuestContainer, subQuest, player);
+
+                if(first == NULL)
+                {
+                    first = subQuestContainer;
+                }
+                else
+                {
+                    current->next = subQuestContainer;
+                }
+                
+                current = subQuestContainer;
+            }
+        }
+
+        if(current != NULL)
+            current->next = NULL;
+        container->subQuests = first;
+        
+    }
+
+    void QuestManager::addHints(QuestContainer* container, Quest* quest, const PlayerInfo* player)
+    {
+        HintContainer* current = NULL;
+        HintContainer* first = NULL;
+
+        std::list<QuestHint*> hints = quest->getHintsList();
+        for(std::list<QuestHint*>::iterator it = hints.begin(); it != hints.end(); it++)
+        {
+            if((*it)->isActive(player))
+            {
+                HintContainer* hint = new HintContainer;
+                hint->description = (*it)->getDescription();
+
+                if(first == NULL)
+                {
+                    first = hint;
+                }
+                else
+                {
+                    current->next = hint;
+                }
+                
+                current = hint;
+            }
+        }
+
+        if(current != NULL)
+            current->next = NULL;
+        container->hint = first;
+    }
+
+    /*static*/ void QuestManager::toggleQuestGUI(void)
+    {
+        if (!QuestManager::GUIOpen)
+        {
+            GUIManager::getInstancePtr()->showGUI("QuestGUI");
+            GUIManager::getInstancePtr()->executeCode("showCursor()");
+            InputManager::getInstance().requestEnterState("guiMouseOnly");
+            GUIManager::getInstancePtr()->executeCode("loadQuestsList()");
+            GUIOpen = true;
+        }
+        else
+        {
+            GUIManager::getInstancePtr()->executeCode("hideGUI(\"QuestGUI\")");
+            GUIManager::getInstancePtr()->executeCode("hideCursor()");
+            InputManager::getInstance().requestLeaveState("guiMouseOnly");
+            GUIOpen = false;
+        }
+    }
+
 
 }
Index: /code/trunk/src/orxonox/objects/quest/QuestManager.h
===================================================================
--- /code/trunk/src/orxonox/objects/quest/QuestManager.h	(revision 2962)
+++ /code/trunk/src/orxonox/objects/quest/QuestManager.h	(revision 2963)
@@ -38,21 +38,32 @@
 
 #include <map>
+#include <list>
 #include <string>
 
 #include "core/OrxonoxClass.h"
 #include "orxonox/objects/infos/PlayerInfo.h"
+#include "overlays/GUIOverlay.h"
 
 // tolua_begin
 namespace orxonox
 {
-// tolua_end
 
-    struct RootQuest
+    struct QuestContainer;
+    struct HintContainer;
+
+    struct QuestContainer
     {
-        Quest* quest;
-        RootQuest* next;
+        const QuestDescription* description;
+        HintContainer* hint;
+        QuestContainer* subQuests;
+        QuestContainer* next;
     };
 
-// tolua_begin
+    struct HintContainer
+    {
+        const QuestDescription* description;
+        HintContainer* next;
+    };
+
     /**
     @brief
@@ -80,5 +91,5 @@
             QuestHint* findHint(const std::string & hintId); //!< Returns the QuestHint with the input id.
 
-            RootQuest* getQuests(const PlayerInfo & player);
+            QuestContainer* getQuestTree(std::string & name); // tolua_export
 
             static void toggleQuestGUI(void); //!< Opens the GUI.
@@ -91,4 +102,8 @@
             std::map<std::string, QuestHint*> hintMap_; //!< All QuestHints registered by their id's.
 
+            void getRootQuests(const PlayerInfo* player, std::list<Quest*> & list);
+            void addHints(QuestContainer* container, Quest* quest, const PlayerInfo* player);
+            void addSubQuests(QuestContainer* container, Quest* quest, const PlayerInfo* player);
+
     }; // tolua_export
 
Index: /code/trunk/src/orxonox/overlays/GUIOverlay.cc
===================================================================
--- /code/trunk/src/orxonox/overlays/GUIOverlay.cc	(revision 2962)
+++ /code/trunk/src/orxonox/overlays/GUIOverlay.cc	(revision 2963)
@@ -53,4 +53,6 @@
 
         XMLPortParam(GUIOverlay, "guiname", setGUIName, getGUIName, xmlElement, mode);
+        
+        GUIManager::getInstancePtr()->registerOverlay(this->guiName_, this);
     }
 
