Index: code/branches/pickups2/src/orxonox/objects/controllers/HumanController.h
===================================================================
--- code/branches/pickups2/src/orxonox/objects/controllers/HumanController.h	(revision 2972)
+++ code/branches/pickups2/src/orxonox/objects/controllers/HumanController.h	(revision 3001)
@@ -34,4 +34,5 @@
 #include "util/Math.h"
 #include "Controller.h"
+#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
@@ -68,4 +69,12 @@
             static inline HumanController* getLocalControllerSingleton()
                 { return HumanController::localController_s; }
+            static inline Pawn* getLocalControllerEntityAsPawn()
+            {
+                if (HumanController::localController_s) {
+                    return dynamic_cast<Pawn*>(HumanController::localController_s->getControllableEntity());
+                } else {
+                    return NULL;
+                }
+            }
 
         private:
Index: code/branches/pickups2/src/orxonox/objects/pickup/BaseItem.cc
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/BaseItem.cc	(revision 2972)
+++ code/branches/pickups2/src/orxonox/objects/pickup/BaseItem.cc	(revision 3001)
@@ -52,4 +52,6 @@
         this->setOwner(0);
         this->setPickupIdentifier(this->getName());
+        this->setGUIImage("");
+        this->setGUIText("");
     }
     //! Deconstructor.
@@ -68,5 +70,4 @@
 
         XMLPortParam(BaseItem, "guiText", setGUIText, getGUIText, xmlelement, mode);
-        XMLPortParam(BaseItem, "guiTooltip", setGUITooltip, getGUITooltip, xmlelement, mode);
         XMLPortParam(BaseItem, "guiImage", setGUIImage, getGUIImage, xmlelement, mode);
     }
@@ -103,3 +104,5 @@
         return true;
     }
+
+    const std::string& BaseItem::getGUIText() const { return this->guiText_; }
 }
Index: code/branches/pickups2/src/orxonox/objects/pickup/BaseItem.h
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/BaseItem.h	(revision 2972)
+++ code/branches/pickups2/src/orxonox/objects/pickup/BaseItem.h	(revision 3001)
@@ -50,5 +50,8 @@
             Daniel 'Huty' Haggenmueller
     */
-    class _OrxonoxExport BaseItem : public BaseObject
+    class _OrxonoxExport BaseItem
+// tolua_end
+        : public BaseObject
+// tolua_begin
     {
 // tolua_end
@@ -122,15 +125,9 @@
 
         // GUI stuff
-        virtual const std::string& getGUIText()
-            { return this->guiText_; }
+        virtual const std::string& getGUIText() const; // tolua_export
         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()
+        virtual const std::string& getGUIImage() const
             { return this->guiImage_; }
         inline void setGUIImage(const std::string& image)
@@ -149,8 +146,7 @@
 
         std::string guiText_;
-        std::string guiTooltip_;
         std::string guiImage_;
-    };
-}
+    }; // tolua_export
+} // tolua_export
 
 #endif /* _BaseItem_H__ */
Index: code/branches/pickups2/src/orxonox/objects/pickup/Jump.cc
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/Jump.cc	(revision 2972)
+++ code/branches/pickups2/src/orxonox/objects/pickup/Jump.cc	(revision 3001)
@@ -103,5 +103,5 @@
     bool Jump::dropped(Pawn* pawn)
     {
-        DroppedItem::createDefaultDrop(this, pawn, ColourValue(1.0f, 0.0f, 0.0f), 5.0f);
+        DroppedItem::createDefaultDrop(this, pawn, ColourValue(1.0f, 0.0f, 0.0f), 30.0f);
         return this->removeFrom(pawn);
     }
Index: code/branches/pickups2/src/orxonox/objects/pickup/Jump.h
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/Jump.h	(revision 2972)
+++ code/branches/pickups2/src/orxonox/objects/pickup/Jump.h	(revision 3001)
@@ -55,4 +55,7 @@
         virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);  //!< XMLPort
 
+        virtual int getMaxCarryAmount() const
+            { return INT_MAX; }
+
         virtual void used(Pawn* pawn);          //!< Called when the item is used.
 
Index: code/branches/pickups2/src/orxonox/objects/pickup/PickupCollection.cc
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/PickupCollection.cc	(revision 2972)
+++ code/branches/pickups2/src/orxonox/objects/pickup/PickupCollection.cc	(revision 3001)
@@ -49,4 +49,5 @@
     {
         this->bBlockRemovals_ = false;
+        this->currentUsable_ = NULL;
     }
 
@@ -64,4 +65,8 @@
         if (this->checkSlot(item))
         {
+            Identifier* ident = Class(UsableItem);
+            if(this->currentUsable_ == NULL && item->isA(ident))
+                this->currentUsable_ = dynamic_cast<UsableItem*>(item);
+
             this->items_.insert( std::pair<std::string, BaseItem*> (item->getPickupIdentifier(), item) );
             return true;
@@ -99,4 +104,5 @@
                 (*it).second->dropped((*it).second->getOwner());
         }
+        this->currentUsable_ = NULL;
         this->items_.clear();
         this->bBlockRemovals_ = false;
@@ -130,14 +136,6 @@
     void PickupCollection::useItem()
     {
-        Identifier* ident = Class(UsableItem);
-        for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++)
-        {
-            if ((*it).second->isA(ident))
-            {
-                UsableItem* asUsable = dynamic_cast<UsableItem*>((*it).second);
-                asUsable->used(this->owner_);
-                return;
-            }
-        }
+        if(this->currentUsable_)
+            this->currentUsable_->used(this->owner_);
     }
     /**
@@ -160,4 +158,13 @@
             return;
 
+        if (item == this->currentUsable_ || (this->currentUsable_ && removeAllOfType && this->currentUsable_->getPickupIdentifier() == item->getPickupIdentifier()))
+        {
+            std::deque<UsableItem*> usables = this->getUsableItems();
+
+            if(usables.size() > 0)
+                this->currentUsable_ = usables.at(0);
+            else
+                this->currentUsable_ = NULL;
+        }
         if (removeAllOfType)
         {
Index: code/branches/pickups2/src/orxonox/objects/pickup/PickupCollection.h
===================================================================
--- code/branches/pickups2/src/orxonox/objects/pickup/PickupCollection.h	(revision 2972)
+++ code/branches/pickups2/src/orxonox/objects/pickup/PickupCollection.h	(revision 3001)
@@ -106,4 +106,9 @@
             { this->owner_ = owner; }
 
+        inline UsableItem* getCurrentUsable()
+            { return this->currentUsable_; };
+        inline void setCurrentUsable(UsableItem* usable)
+            { this->currentUsable_ = usable; }
+
         std::deque<EquipmentItem*> getEquipmentItems();   //!< Get a list of equipment-type items.
         std::deque<PassiveItem*> getPassiveItems();     //!< Get a list of passive items.
@@ -111,4 +116,5 @@
     private:
         Pawn* owner_;           //!< The owner of the PickupCollection.
+        UsableItem* currentUsable_;
 
         bool bBlockRemovals_;   //!< Whether to block direct removals through remove().
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 3001)
@@ -30,6 +30,6 @@
 
 #include "EquipmentItem.h"
+#include "PassiveItem.h"
 #include "UsableItem.h"
-#include "PassiveItem.h"
 
 #include "core/CoreIncludes.h"
@@ -39,8 +39,11 @@
 #include "gui/GUIManager.h"
 #include "objects/controllers/HumanController.h"
-#include "objects/worldentities/pawns/SpaceShip.h"
-
+#include "objects/worldentities/pawns/Pawn.h"
+
+#include <CEGUIImage.h>
+#include <CEGUIImageset.h>
 #include <CEGUIImagesetManager.h>
 #include <CEGUIWindow.h>
+#include <CEGUIWindowManager.h>
 #include <elements/CEGUITabControl.h>
 
@@ -78,85 +81,103 @@
         }
     }
+
+    unsigned int PickupInventory::getCurrentUsableIndex()
+    {
+        Pawn* pawn = HumanController::getLocalControllerEntityAsPawn();
+        if(pawn && pawn->getPickups().getCurrentUsable())
+        {
+            UsableItem* use = pawn->getPickups().getCurrentUsable();
+            std::deque<UsableItem*> items = pawn->getPickups().getUsableItems();
+            for(unsigned int i = 0; i < items.size(); i++)
+            {
+                if(items.at(i) == use)
+                    return i;
+            }
+        }
+
+        return 0;
+    }
+    bool PickupInventory::isCurrentUsable(const BaseItem* item)
+    {
+        Pawn* pawn = HumanController::getLocalControllerEntityAsPawn();
+        if(pawn)
+            return (pawn->getPickups().getCurrentUsable() == item);
+        else
+            return false;
+    }
+    void PickupInventory::selectUsable(unsigned int i)
+    {
+        Pawn* pawn = HumanController::getLocalControllerEntityAsPawn();
+        if(pawn)
+        {
+            std::deque<UsableItem*> items = pawn->getPickups().getUsableItems();
+            if(i < items.size())
+                pawn->getPickups().setCurrentUsable(items.at(i));
+        }
+    }
+
     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;
+        Pawn* pawn = HumanController::getLocalControllerEntityAsPawn();
+        if(pawn)
+            return pawn->getPickups().getEquipmentItems().size();
+        else
+            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;
+        Pawn* pawn = HumanController::getLocalControllerEntityAsPawn();
+        if(pawn)
+            return pawn->getPickups().getUsableItems().size();
+        else
+            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);
+        Pawn* pawn = HumanController::getLocalControllerEntityAsPawn();
+        if(pawn)
+            return pawn->getPickups().getPassiveItems().size();
+        else
+            return 0;
+    }
+    BaseItem* PickupInventory::getEquipmentItem(unsigned int i)
+    {
+        Pawn* pawn = HumanController::getLocalControllerEntityAsPawn();
+        if(pawn)
+        {
+            std::deque<EquipmentItem*> l = pawn->getPickups().getEquipmentItems();
+            if (i >= l.size()) { return NULL; }
+            return l.at(i);
+        }
+        else
+            return NULL;
+    }
+    BaseItem* PickupInventory::getUsableItem(unsigned int i)
+    {
+        Pawn* pawn = HumanController::getLocalControllerEntityAsPawn();
+        if(pawn)
+        {
+            std::deque<UsableItem*> l = pawn->getPickups().getUsableItems();
+            if (i >= l.size()) { return NULL; }
+            return l.at(i);
+        }
+        else
+            return NULL;
+    }
+    BaseItem* PickupInventory::getPassiveItem(unsigned int i)
+    {
+        Pawn* pawn = HumanController::getLocalControllerEntityAsPawn();
+        if(pawn)
+        {
+            std::deque<PassiveItem*> l = pawn->getPickups().getPassiveItems();
+            if (i >= l.size()) { return NULL; }
+            return l.at(i);
+        }
+        else
+            return NULL;
+    }
+
+    std::string PickupInventory::getImageForItem(const BaseItem* item)
+    {
         if(!item)
             return "";
@@ -164,37 +185,114 @@
         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;
+        if(!CEGUI::ImagesetManager::getSingletonPtr()->isImagesetPresent(name))
+        {
+            CEGUI::ImagesetManager::getSingletonPtr()->createImagesetFromImageFile(name, item->getGUIImage(), "");
+        }
+
+        return "set:" + name + " image:full_image";
+    }
+
+    void PickupInventory::clearInventory(CEGUI::WindowManager* winMgr, int equipCount, int usableCount)
+    {
+        for(int i = 0; i < equipCount; i++)
+        {
+            std::ostringstream id;
+            id << i;
+
+            winMgr->destroyWindow("orxonox/Inventory/Frame/equ/" + id.str());
+            winMgr->destroyWindow("orxonox/Inventory/Title/equ/" + id.str());
+            winMgr->destroyWindow("orxonox/Inventory/Items/equ/" + id.str());
+        }
+        for(int i = 0; i < usableCount; i++)
+        {
+            std::ostringstream id;
+            id << i;
+
+            std::string s = id.str();
+            winMgr->destroyWindow("orxonox/Inventory/Frame/use/" + id.str());
+            winMgr->destroyWindow("orxonox/Inventory/Title/use/" + id.str());
+            winMgr->destroyWindow("orxonox/Inventory/Items/use/" + id.str());
+        }
+    }
+    void PickupInventory::updateTabs(CEGUI::WindowManager *winMgr, CEGUI::Window *equipWindow, CEGUI::Window *usableWindow)
+    {
+        PickupInventory::updateEquipment(winMgr, equipWindow);
+        PickupInventory::updateUsable(winMgr, usableWindow);
+    }
+
+    void PickupInventory::updateEquipment(CEGUI::WindowManager* winMgr, CEGUI::Window* target)
+    {
+        Pawn* pawn;
+        if(pawn = HumanController::getLocalControllerEntityAsPawn())
+        {
+            std::deque<EquipmentItem*> items = pawn->getPickups().getEquipmentItems();
+            for(unsigned int i = 0; i < items.size(); i++)
+            {
+                std::ostringstream id;
+                id << "equ/" << i;
+
+                EquipmentItem* item = items.at(i);
+
+                PickupInventory::addItem(winMgr, target, id.str(), item, "FFFFFFFF", i % 5, i / 5);
+            }
+        }
+    }
+    void PickupInventory::updateUsable(CEGUI::WindowManager* winMgr, CEGUI::Window* target)
+    {
+        Pawn* pawn;
+        if(pawn = HumanController::getLocalControllerEntityAsPawn())
+        {
+            std::deque<UsableItem*> items = pawn->getPickups().getUsableItems();
+            for(unsigned int i = 0; i < items.size(); i++)
+            {
+                std::ostringstream id;
+                id << "use/" << i;
+
+                UsableItem* item = items.at(i);
+                std::string colour;
+
+                if(PickupInventory::isCurrentUsable(item))
+                    colour = "FFFF5555";
+                else
+                    colour = "FFFFFFFF";
+
+                PickupInventory::addItem(winMgr, target, id.str(), item, colour, i % 5, i / 5);
+            }
+        }
+    }
+
+    void PickupInventory::addItem(CEGUI::WindowManager* winMgr, CEGUI::Window* target, const std::string& id, BaseItem* item, const std::string& titleColour, int x, int y)
+    { 
+        if(!winMgr || !target || !item) { return; }
+
+        std::string image = PickupInventory::getImageForItem(item);
+
+        CEGUI::Window* frame = winMgr->createWindow("TaharezLook/StaticImage", "orxonox/Inventory/Frame/" + id);
+        frame->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 5 + x * 70), CEGUI::UDim(0, 5 + y * 90)));
+        frame->setSize(CEGUI::UVector2(CEGUI::UDim(0, 65), CEGUI::UDim(0, 65)));
+
+        CEGUI::Window* text = winMgr->createWindow("TaharezLook/StaticText", "orxonox/Inventory/Title/" + id);
+        text->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 5 + x * 70), CEGUI::UDim(0, 70 + y * 90)));
+        text->setSize(CEGUI::UVector2(CEGUI::UDim(0, 65), CEGUI::UDim(0, 20)));
+        text->setProperty("Text", item->getGUIText());
+        text->setProperty("FrameEnabled", "False");
+        text->setProperty("BackgroundEnabled", "False");
+        text->setProperty("HorzFormatting", "HorzCentred");
+        text->setProperty("VertFormatting", "VertCentred");
+        text->setProperty("TextColours", "tl:" + titleColour + " tr:" + titleColour + " bl:" + titleColour + " br:" + titleColour + "");
+
+        CEGUI::Window* btn = winMgr->createWindow("TaharezLook/Button", "orxonox/Inventory/Items/" + id);
+        btn->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 8 + x * 70), CEGUI::UDim(0, 8 + y * 90)));
+        btn->setSize(CEGUI::UVector2(CEGUI::UDim(0, 59), CEGUI::UDim(0, 59)));
+        btn->setProperty("NormalImage", image);
+        btn->setProperty("HoverImage", image);
+        btn->setProperty("PushedImage", image);
+        btn->setProperty("DisabledImage", image);
+        btn->setProperty("Tooltip", item->getGUIText());
+        btn->subscribeScriptedEvent("Clicked", "itemClicked");
+
+        target->addChildWindow(text);
+        target->addChildWindow(frame);
+        target->addChildWindow(btn);
     }
 }
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 3001)
@@ -39,17 +39,17 @@
 #include "core/BaseObject.h"
 
-namespace CEGUI { class Window; }
+namespace CEGUI { class Window; class WindowManager; class Image; }
 
 // tolua_begin
 namespace orxonox
 {
-    class EquipmentItem;
-    class PassiveItem;
-    class UsableItem;
+// tolua_end
+    class _OrxonoxExport BaseItem;
 
     /**
         @brief Static class for the inventory GUI window.
         @author Daniel 'Huty' Haggenmueller
-    */
+    */ 
+// tolua_begin
     class _OrxonoxExport PickupInventory
     {
@@ -70,11 +70,21 @@
         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 unsigned int getCurrentUsableIndex(); // tolua_export
+        static bool isCurrentUsable(const BaseItem* item); // tolua_export
+        static void selectUsable(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
+        static BaseItem* getEquipmentItem(unsigned int i); // tolua_export
+        static BaseItem* getUsableItem(unsigned int i); // tolua_export
+        static BaseItem* getPassiveItem(unsigned int i); // tolua_export
+
+        static std::string getImageForItem(const BaseItem* item); // tolua_export
+
+        static void clearInventory(CEGUI::WindowManager* winMgr, int equipCount, int usableCount); // tolua_export
+        static void updateTabs(CEGUI::WindowManager* winMgr, CEGUI::Window* equipWindow, CEGUI::Window* usableWindow); // tolua_export
+
+        static void updateEquipment(CEGUI::WindowManager* winMgr, CEGUI::Window* target);
+        static void updateUsable(CEGUI::WindowManager* winMgr, CEGUI::Window* target);
+
+        static void addItem(CEGUI::WindowManager* winMgr, CEGUI::Window* target, const std::string& id, BaseItem* item, const std::string& titleColour, int x, int y); // tolua_export
     }; // tolua_export
 } // tolua_export
