Index: code/branches/pickups2/src/orxonox/objects/controllers/HumanController.h
===================================================================
--- code/branches/pickups2/src/orxonox/objects/controllers/HumanController.h	(revision 2917)
+++ code/branches/pickups2/src/orxonox/objects/controllers/HumanController.h	(revision 2972)
@@ -66,4 +66,7 @@
             static void killBots(unsigned int amount = 0);
 
+            static inline HumanController* getLocalControllerSingleton()
+                { return HumanController::localController_s; }
+
         private:
             static HumanController* localController_s;
Index: code/branches/pickups2/src/orxonox/objects/pickup/BaseItem.cc
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/BaseItem.cc	(revision 2917)
+++ code/branches/pickups2/src/orxonox/objects/pickup/BaseItem.cc	(revision 2972)
@@ -35,4 +35,7 @@
 
 #include "PickupCollection.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
 #include "objects/worldentities/pawns/Pawn.h"
 
@@ -54,4 +57,19 @@
     {
     }
+
+    /**
+        @brief XMLPort for BaseItem.
+        @param xmlelement Element of the XML-file.
+        @param mode XMLPort mode to use.
+    */
+    void BaseItem::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(BaseItem, XMLPort, xmlelement, mode);
+
+        XMLPortParam(BaseItem, "guiText", setGUIText, getGUIText, xmlelement, mode);
+        XMLPortParam(BaseItem, "guiTooltip", setGUITooltip, getGUITooltip, xmlelement, mode);
+        XMLPortParam(BaseItem, "guiImage", setGUIImage, getGUIImage, xmlelement, mode);
+    }
+
     /**
         @brief Method to add the item to a pawn.
Index: code/branches/pickups2/src/orxonox/objects/pickup/BaseItem.h
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/BaseItem.h	(revision 2917)
+++ code/branches/pickups2/src/orxonox/objects/pickup/BaseItem.h	(revision 2972)
@@ -39,4 +39,5 @@
 #include "core/BaseObject.h"
 
+// tolua_begin
 namespace orxonox
 {
@@ -51,7 +52,10 @@
     class _OrxonoxExport BaseItem : public BaseObject
     {
+// tolua_end
     public:
         BaseItem(BaseObject* creator);
         virtual ~BaseItem();
+
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);  //!< XMLPort
 
         /**
@@ -116,4 +120,20 @@
         inline void setPickupIdentifier(const std::string& identifier)
             { this->pickupIdentifier_ = identifier; }
+
+        // GUI stuff
+        virtual const std::string& getGUIText()
+            { return this->guiText_; }
+        inline void setGUIText(const std::string& text)
+            { this->guiText_ = text; }
+
+        virtual const std::string& getGUITooltip()
+            { return this->guiTooltip_; }
+        inline void setGUITooltip(const std::string& tooltip)
+            { this->guiTooltip_ = tooltip; }
+
+        virtual const std::string& getGUIImage()
+            { return this->guiImage_; }
+        inline void setGUIImage(const std::string& image)
+            { this->guiImage_ = image; }
     private:
         Pawn* owner_;   //!< The current owner of the item.
@@ -127,4 +147,8 @@
         */
         std::string pickupIdentifier_;
+
+        std::string guiText_;
+        std::string guiTooltip_;
+        std::string guiImage_;
     };
 }
Index: code/branches/pickups2/src/orxonox/objects/pickup/CMakeLists.txt
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/CMakeLists.txt	(revision 2917)
+++ code/branches/pickups2/src/orxonox/objects/pickup/CMakeLists.txt	(revision 2972)
@@ -7,4 +7,5 @@
   PassiveItem.cc
   PickupCollection.cc
+  PickupInventory.cc
   PickupSpawner.cc
   UsableItem.cc
Index: code/branches/pickups2/src/orxonox/objects/pickup/DroppedItem.cc
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/DroppedItem.cc	(revision 2917)
+++ code/branches/pickups2/src/orxonox/objects/pickup/DroppedItem.cc	(revision 2972)
@@ -55,5 +55,8 @@
     {
         if (this->item_)
+        {
+            COUT(3) << "Delete DroppedItem with '" << this->item_->getPickupIdentifier() << "'" << std::endl;
             delete this->item_;
+        }
 
         delete this;
Index: code/branches/pickups2/src/orxonox/objects/pickup/PickupCollection.cc
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/PickupCollection.cc	(revision 2917)
+++ code/branches/pickups2/src/orxonox/objects/pickup/PickupCollection.cc	(revision 2972)
@@ -38,4 +38,6 @@
 #include "PassiveItem.h"
 #include "UsableItem.h"
+
+#include "core/CoreIncludes.h"
 
 #include "objects/worldentities/pawns/Pawn.h"
@@ -312,7 +314,7 @@
         @return Returns a list of all the equipment-type items in the collection.
     */
-    std::set<BaseItem*> PickupCollection::getEquipmentItems()
-    {
-        std::set<BaseItem*> ret;
+    std::deque<EquipmentItem*> PickupCollection::getEquipmentItems()
+    {
+        std::deque<EquipmentItem*> ret;
         Identifier* ident = Class(EquipmentItem);
 
@@ -320,5 +322,5 @@
         {
             if ((*it).second->isA(ident))
-                ret.insert((*it).second);
+                ret.push_back(dynamic_cast<EquipmentItem*>((*it).second));
         }
 
@@ -329,7 +331,7 @@
         @return Returns a list of all the passive items in the collection.
     */
-    std::set<BaseItem*> PickupCollection::getPassiveItems()
-    {
-        std::set<BaseItem*> ret;
+    std::deque<PassiveItem*> PickupCollection::getPassiveItems()
+    {
+        std::deque<PassiveItem*> ret;
         Identifier* ident = Class(PassiveItem);
 
@@ -337,5 +339,5 @@
         {
             if ((*it).second->isA(ident))
-                ret.insert((*it).second);
+                ret.push_back(dynamic_cast<PassiveItem*>((*it).second));
         }
 
@@ -346,7 +348,7 @@
         @return Returns a list of all the usable items in the collection.
     */
-    std::set<BaseItem*> PickupCollection::getUsableItems()
-    {
-        std::set<BaseItem*> ret;
+    std::deque<UsableItem*> PickupCollection::getUsableItems()
+    {
+        std::deque<UsableItem*> ret;
         Identifier* ident = Class(UsableItem);
 
@@ -354,5 +356,5 @@
         {
             if ((*it).second->isA(ident))
-                ret.insert((*it).second);
+                ret.push_back(dynamic_cast<UsableItem*>((*it).second));
         }
 
Index: code/branches/pickups2/src/orxonox/objects/pickup/PickupCollection.h
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/PickupCollection.h	(revision 2917)
+++ code/branches/pickups2/src/orxonox/objects/pickup/PickupCollection.h	(revision 2972)
@@ -38,5 +38,5 @@
 
 #include <map>
-#include <set>
+#include <deque>
 #include <string>
 
@@ -48,4 +48,6 @@
 {
     class BaseItem;
+    class EquipmentItem;
+    class PassiveItem;
     class UsableItem;
     class Pawn;
@@ -104,7 +106,7 @@
             { this->owner_ = owner; }
 
-        std::set<BaseItem*> getEquipmentItems();   //!< Get a list of equipment-type items.
-        std::set<BaseItem*> getPassiveItems();     //!< Get a list of passive items.
-        std::set<BaseItem*> getUsableItems();      //!< Get a list of usable items.
+        std::deque<EquipmentItem*> getEquipmentItems();   //!< Get a list of equipment-type items.
+        std::deque<PassiveItem*> getPassiveItems();     //!< Get a list of passive items.
+        std::deque<UsableItem*> getUsableItems();      //!< Get a list of usable items.
     private:
         Pawn* owner_;           //!< The owner of the PickupCollection.
Index: code/branches/pickups2/src/orxonox/objects/pickup/PickupInventory.cc
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/PickupInventory.cc	(revision 2972)
+++ code/branches/pickups2/src/orxonox/objects/pickup/PickupInventory.cc	(revision 2972)
@@ -0,0 +1,200 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Daniel 'Huty' Haggenmueller
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "PickupInventory.h"
+
+#include "EquipmentItem.h"
+#include "UsableItem.h"
+#include "PassiveItem.h"
+
+#include "core/CoreIncludes.h"
+#include "core/ConsoleCommand.h"
+#include "core/input/InputManager.h"
+
+#include "gui/GUIManager.h"
+#include "objects/controllers/HumanController.h"
+#include "objects/worldentities/pawns/SpaceShip.h"
+
+#include <CEGUIImagesetManager.h>
+#include <CEGUIWindow.h>
+#include <elements/CEGUITabControl.h>
+
+namespace orxonox
+{
+    orxonox::ConsoleCommand& function_PickupInventory_ToggleInventory_0 =
+        orxonox::CommandExecutor::addConsoleCommandShortcut(orxonox::createConsoleCommand(orxonox::createFunctor(&PickupInventory::toggleInventory), "toggleInventory"), true);
+
+    static bool bInventoryVisible_ = false;
+    void PickupInventory::toggleInventory()
+    {
+        if(bInventoryVisible_) {
+            GUIManager::getInstancePtr()->executeCode("hideGUI(\"PickupInventory\")");
+            GUIManager::getInstancePtr()->executeCode("hideCursor()");
+            InputManager::getInstance().requestLeaveState("guiMouseOnly");
+        }
+        else
+        {
+            GUIManager::getInstancePtr()->showGUI("PickupInventory");
+            GUIManager::getInstancePtr()->executeCode("showCursor()");
+            InputManager::getInstance().requestEnterState("guiMouseOnly");
+        }
+        bInventoryVisible_ = !bInventoryVisible_;
+    }
+    void PickupInventory::tabChanged(CEGUI::Window *tab)
+    {
+        CEGUI::TabControl* tabCtrl = dynamic_cast<CEGUI::TabControl*>(tab);
+        if(tabCtrl != NULL)
+        {
+            COUT(1) << "tabChanged() tab index: " << tabCtrl->getSelectedTabIndex() << std::endl;
+        }
+        else
+        {
+            COUT(1) << "tabChanged() argument is no CEGUI::TabControl!" << std::endl;
+        }
+    }
+    unsigned int PickupInventory::getEquipmentCount()
+    {
+        if (HumanController::getLocalControllerSingleton() && HumanController::getLocalControllerSingleton()->getControllableEntity())
+        {
+            Pawn* pawn = dynamic_cast<Pawn*>(HumanController::getLocalControllerSingleton()->getControllableEntity());
+            if(pawn)
+                return pawn->getPickups().getEquipmentItems().size();
+
+        }
+        return 0;
+    }
+    unsigned int PickupInventory::getUsableCount()
+    {
+        if (HumanController::getLocalControllerSingleton() && HumanController::getLocalControllerSingleton()->getControllableEntity())
+        {
+            Pawn* pawn = dynamic_cast<Pawn*>(HumanController::getLocalControllerSingleton()->getControllableEntity());
+            if(pawn)
+                return pawn->getPickups().getUsableItems().size();
+
+        }
+        return 0;
+    }
+    unsigned int PickupInventory::getPassiveCount()
+    {
+        if (HumanController::getLocalControllerSingleton() && HumanController::getLocalControllerSingleton()->getControllableEntity())
+        {
+            Pawn* pawn = dynamic_cast<Pawn*>(HumanController::getLocalControllerSingleton()->getControllableEntity());
+            if(pawn)
+                return pawn->getPickups().getPassiveItems().size();
+
+        }
+        return 0;
+    }
+    EquipmentItem* PickupInventory::getEquipmentItem(unsigned int i)
+    {
+        if (HumanController::getLocalControllerSingleton() && HumanController::getLocalControllerSingleton()->getControllableEntity())
+        {
+            Pawn* pawn = dynamic_cast<Pawn*>(HumanController::getLocalControllerSingleton()->getControllableEntity());
+            if(pawn)
+            {
+                std::deque<EquipmentItem*> l = pawn->getPickups().getEquipmentItems();
+                if (i >= l.size()) { return NULL; }
+                return l.at(i);
+            }
+
+        }
+        return NULL;
+    }
+    UsableItem* PickupInventory::getUsableItem(unsigned int i)
+    {
+        if (HumanController::getLocalControllerSingleton() && HumanController::getLocalControllerSingleton()->getControllableEntity())
+        {
+            Pawn* pawn = dynamic_cast<Pawn*>(HumanController::getLocalControllerSingleton()->getControllableEntity());
+            if(pawn)
+            {
+                std::deque<UsableItem*> l = pawn->getPickups().getUsableItems();
+                if (i >= l.size()) { return NULL; }
+                return l.at(i);
+            }
+
+        }
+        return NULL;
+    }
+    PassiveItem* PickupInventory::getPassiveItem(unsigned int i)
+    {
+        if (HumanController::getLocalControllerSingleton() && HumanController::getLocalControllerSingleton()->getControllableEntity())
+        {
+            Pawn* pawn = dynamic_cast<Pawn*>(HumanController::getLocalControllerSingleton()->getControllableEntity());
+            if(pawn)
+            {
+                std::deque<PassiveItem*> l = pawn->getPickups().getPassiveItems();
+                if (i >= l.size()) { return NULL; }
+                return l.at(i);
+            }
+
+        }
+        return NULL;
+    }
+    std::string PickupInventory::getImagesetForEquipment(unsigned int i)
+    {
+        EquipmentItem* item = PickupInventory::getEquipmentItem(i);
+        if(!item)
+            return "";
+
+        std::string name = "pickup_" + item->getGUIImage();
+
+        if(!CEGUI::ImagesetManager::getSingletonPtr()->isImagesetPresent(name)) {
+            CEGUI::ImagesetManager::getSingletonPtr()->createImagesetFromImageFile(name, item->getGUIImage(), "pickups");
+        }
+
+        return name;
+    }
+    std::string PickupInventory::getImagesetForUsable(unsigned int i)
+    {
+        UsableItem* item = PickupInventory::getUsableItem(i);
+        if(!item)
+            return "";
+
+        std::string name = "pickup_" + item->getGUIImage();
+
+        if(!CEGUI::ImagesetManager::getSingletonPtr()->isImagesetPresent(name)) {
+            CEGUI::ImagesetManager::getSingletonPtr()->createImagesetFromImageFile(name, item->getGUIImage(), "pickups");
+        }
+
+        return name;
+    }
+    std::string PickupInventory::getImagesetForPassive(unsigned int i)
+    {
+        PassiveItem* item = PickupInventory::getPassiveItem(i);
+        if(!item)
+            return "";
+
+        std::string name = "pickup_" + item->getGUIImage();
+
+        if(!CEGUI::ImagesetManager::getSingletonPtr()->isImagesetPresent(name)) {
+            CEGUI::ImagesetManager::getSingletonPtr()->createImagesetFromImageFile(name, item->getGUIImage(), "pickups");
+        }
+
+        return name;
+    }
+}
Index: code/branches/pickups2/src/orxonox/objects/pickup/PickupInventory.h
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/PickupInventory.h	(revision 2972)
+++ code/branches/pickups2/src/orxonox/objects/pickup/PickupInventory.h	(revision 2972)
@@ -0,0 +1,82 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Daniel 'Huty' Haggenmueller
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file
+    @brief Declaration of static class for the inventory GUI window.
+*/
+
+#ifndef _PickupInventory_H__
+#define _PickupInventory_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "core/BaseObject.h"
+
+namespace CEGUI { class Window; }
+
+// tolua_begin
+namespace orxonox
+{
+    class EquipmentItem;
+    class PassiveItem;
+    class UsableItem;
+
+    /**
+        @brief Static class for the inventory GUI window.
+        @author Daniel 'Huty' Haggenmueller
+    */
+    class _OrxonoxExport PickupInventory
+    {
+// tolua_end
+    public:
+        //PickupInventory(BaseObject* creator);
+        //virtual ~PickupInventory();
+
+        /**
+            @brief Toggle visiblity of inventory.
+        */
+        static void toggleInventory(); // tolua_export
+
+        static void tabChanged(CEGUI::Window* tab); // tolua_export
+
+        static unsigned int getEquipmentCount(); // tolua_export
+        static unsigned int getUsableCount(); // tolua_export
+        static unsigned int getPassiveCount(); // tolua_export
+
+        static EquipmentItem* getEquipmentItem(unsigned int i); // tolua_export
+        static UsableItem* getUsableItem(unsigned int i); // tolua_export
+        static PassiveItem* getPassiveItem(unsigned int i); // tolua_export
+
+        static std::string getImagesetForEquipment(unsigned int i); // tolua_export
+        static std::string getImagesetForUsable(unsigned int i); // tolua_export 
+        static std::string getImagesetForPassive(unsigned int i); // tolua_export
+    }; // tolua_export
+} // tolua_export
+
+#endif /* _PickupInventory_H__ */
Index: code/branches/pickups2/src/orxonox/objects/pickup/UsableItem.cc
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/UsableItem.cc	(revision 2917)
+++ code/branches/pickups2/src/orxonox/objects/pickup/UsableItem.cc	(revision 2972)
@@ -26,5 +26,5 @@
  *
  */
-
+        
 /**
     @file
