Index: code/trunk/src/modules/overlays/OverlaysPrereqs.h
===================================================================
--- code/trunk/src/modules/overlays/OverlaysPrereqs.h	(revision 11176)
+++ code/trunk/src/modules/overlays/OverlaysPrereqs.h	(revision 11353)
@@ -104,4 +104,6 @@
     class PauseNotice;
     class TeamBaseMatchScore;
+    class HUDPickupSystem;
+    class HUDPickupItem;
 
     // stats
Index: code/trunk/src/modules/overlays/hud/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/overlays/hud/CMakeLists.txt	(revision 11176)
+++ code/trunk/src/modules/overlays/hud/CMakeLists.txt	(revision 11353)
@@ -14,4 +14,6 @@
   HUDWeapon.cc
   HUDWeaponSystem.cc
+  HUDPickupItem.cc
+  HUDPickupSystem.cc
   ChatOverlay.cc
   AnnounceMessage.cc
Index: code/trunk/src/modules/overlays/hud/HUDPickupItem.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDPickupItem.cc	(revision 11353)
+++ code/trunk/src/modules/overlays/hud/HUDPickupItem.cc	(revision 11353)
@@ -0,0 +1,83 @@
+/*
+ *   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:
+ *      Patrick Wintermeyer
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "HUDPickupItem.h"
+
+#include <string>
+
+
+#include <OgreOverlayManager.h>
+#include <OgrePanelOverlayElement.h> 
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "core/class/Super.h"
+#include "HUDPickupItem.h"
+
+namespace orxonox
+{
+    RegisterClass(HUDPickupItem);
+
+    HUDPickupItem::HUDPickupItem(Context* context) : OrxonoxOverlay(context)
+    {
+        RegisterObject(HUDPickupItem);
+
+        std::string name = "HUDPickupItem" + getUniqueNumberString();
+
+        overlayElement_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", name ));
+
+        overlayElement_->setDimensions(0.075f,0.08f);
+        
+    }
+
+    HUDPickupItem::~HUDPickupItem()
+    {
+        if (this->isInitialized())
+        {
+            overlayElement_=nullptr;
+        }
+    }
+
+    void HUDPickupItem::initializeMaterial(const std::string& s, float x, float y)
+    {
+        overlayElement_->setMaterialName(s);
+        overlayElement_->setPosition(x, y);
+        overlayElement_->show();
+        this->background_->addChild(overlayElement_);
+    }
+
+    void HUDPickupItem::hideMe(Pickupable* p, bool repaint)
+    {
+        if(!repaint) return;                     //dont do anything, if we are not allowed to repaint because the level is terminating
+        assert(overlayElement_);
+        assert(this->background_);
+        overlayElement_->hide();
+        this->background_->removeChild(overlayElement_->getName());
+    }
+}
Index: code/trunk/src/modules/overlays/hud/HUDPickupItem.h
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDPickupItem.h	(revision 11353)
+++ code/trunk/src/modules/overlays/hud/HUDPickupItem.h	(revision 11353)
@@ -0,0 +1,39 @@
+
+#ifndef _HUDPickupItem_H__
+#define _HUDPickupItem_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <vector>
+#include <string>
+
+#include <OgreOverlayManager.h>
+#include <OgrePanelOverlayElement.h> 
+
+#include "overlays/OrxonoxOverlay.h"
+#include "tools/interfaces/Tickable.h"
+#include "worldentities/pawns/Pawn.h"
+#include "overlays/OverlayGroup.h"
+#include "pickup/Pickup.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDPickupItem : public OrxonoxOverlay, public Tickable
+    {
+    public:
+        HUDPickupItem(Context* context);
+        Ogre::PanelOverlayElement* overlayElement_;
+        virtual ~HUDPickupItem();
+        
+        void initializeMaterial(const std::string& s, float x, float y);  
+        void hideMe(Pickupable* p, bool repaint); 
+
+    private:        
+        WeakPtr<Pawn> owner_;
+        WeakPtr<Pickup> pickup_;
+
+    };
+}
+
+#endif
Index: code/trunk/src/modules/overlays/hud/HUDPickupSystem.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDPickupSystem.cc	(revision 11353)
+++ code/trunk/src/modules/overlays/hud/HUDPickupSystem.cc	(revision 11353)
@@ -0,0 +1,129 @@
+/*
+ *   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:
+ *      Patrick Wintermeyer
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include <vector>
+#include <string>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "core/class/Super.h"
+#include "HUDPickupSystem.h"
+#include "pickup/Pickup.h"
+#include "HUDPickupItem.h"
+#include "pickup/PickupManager.h"
+
+namespace orxonox
+{
+    RegisterClass(HUDPickupSystem);
+
+    HUDPickupSystem::HUDPickupSystem(Context* context) : OrxonoxOverlay(context)
+    {
+        RegisterObject(HUDPickupSystem);
+
+        overlayElement_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDPickupSystem" + getUniqueNumberString()));
+        overlayElement_->setMaterialName("PickupBar");
+        overlayElement_->setPosition(0.0f,0.0f);
+        overlayElement_->setDimensions(0.70f,0.15f);
+        this->background_->addChild(overlayElement_);
+    }
+
+    HUDPickupSystem::~HUDPickupSystem()
+    {
+        if (this->isInitialized())
+        {
+            this->picks.clear();
+        }
+    }
+
+    void HUDPickupSystem::updatePickupList(std::vector<Pickupable*> picks, std::map<Pickupable*, uint32_t> indexes_)
+    {
+        int i =0;
+        const float offsetX = 0.345f;
+        float offsetY = 0.82f;
+        const float x = 0.102f;
+
+        if(picks.size()>0)
+        {
+            for(Pickupable* p : picks)
+            {
+                i = indexes_.find(p)->second;
+                offsetY = 0.82f;
+
+                if(i>=5)
+                {
+                    offsetY+=0.075f;
+                    i-=5;
+                }   
+                if(this->picks.count(p)==0)
+                {
+                    HUDPickupItem* item = new HUDPickupItem(this->getContext());
+                    item->initializeMaterial(this->getIcon(((Pickup*)p)->getRepresentationName()), offsetX+i*x, offsetY);
+                
+                    item->setOverlayGroup(this->getOverlayGroup());
+                    this->picks[p] = item;
+                }
+            }
+        }
+    }
+
+    void HUDPickupSystem::createPickupList()
+    {
+    }      
+
+    void HUDPickupSystem::removePickup(Pickupable* pickup)
+    {
+        assert(pickup);
+        HUDPickupItem* item = this->picks.find(pickup)->second;
+        orxout(internal_info, context::pickups) << "removePickup: pickup= " << pickup << " item= " << item << endl;
+        assert(item);
+        item->hideMe(pickup, repaint);
+        assert(overlayElement_);
+        assert(this->background_);
+        this->picks.erase(pickup);
+    }
+
+    void HUDPickupSystem::destroyAll()
+    {
+        this->background_->removeChild(overlayElement_->getName());
+    }
+
+    std::string HUDPickupSystem::getIcon(std::string repName)
+    {
+        if(repName.find("invisible", 0)!=std::string::npos) return "Eye";
+        else if(repName.find("tri", 0)!=std::string::npos) return "Asterisk";
+        else if(repName.find("health", 0)!=std::string::npos || repName.find("Health", 0)!=std::string::npos) return "Cross";
+        else if(repName.find("shield", 0)!=std::string::npos) return "Shield";
+        else if(repName.find("munition", 0)!=std::string::npos) return "Munition";
+        else if(repName.find("shrink", 0)!=std::string::npos) return "Shrink";
+        else if(repName.find("boost", 0)!=std::string::npos) return "Flash";
+        else if(repName.find("speed", 0)!=std::string::npos) return "3arrowsup";
+        else if(repName.find("drone", 0)!=std::string::npos) return "Damage";
+        else return "Unknown";
+    }
+}
Index: code/trunk/src/modules/overlays/hud/HUDPickupSystem.h
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDPickupSystem.h	(revision 11353)
+++ code/trunk/src/modules/overlays/hud/HUDPickupSystem.h	(revision 11353)
@@ -0,0 +1,78 @@
+/*
+ *   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:
+ *      Patrick Wintermeyer
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _HUDPickupSystem_H__
+#define _HUDPickupSystem_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <vector>
+#include <string>
+
+
+#include <OgreOverlayManager.h>
+#include <OgrePanelOverlayElement.h> 
+
+#include "overlays/OrxonoxOverlay.h"
+#include "worldentities/pawns/Pawn.h"
+#include "overlays/OverlayGroup.h"
+#include "pickup/Pickup.h"
+#include "pickup/PickupRepresentation.h"
+#include "HUDPickupItem.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDPickupSystem : public OrxonoxOverlay
+    {
+    public:
+        HUDPickupSystem(Context* context);
+        virtual ~HUDPickupSystem();
+
+        void updatePickupList(std::vector<Pickupable*> picks, std::map<Pickupable*, uint32_t> indexes_);  
+        void createPickupList();  
+        void removePickup(Pickupable* pickup);
+
+        bool repaint=true; //if we shouldnt repaint, set this to false
+
+    private:
+        
+        void destroyAll();
+        std::string getIcon(std::string repName);
+
+        std::map<Pickupable*, HUDPickupItem*> picks;
+
+        Ogre::PanelOverlayElement* overlayElement_;
+        WeakPtr<Pawn> owner_;
+
+        std::vector<PickupRepresentation> pickupRepresentations_;
+    };
+}
+
+#endif
Index: code/trunk/src/modules/pickup/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/pickup/CMakeLists.txt	(revision 11176)
+++ code/trunk/src/modules/pickup/CMakeLists.txt	(revision 11353)
@@ -19,4 +19,5 @@
     PickupPrecompiledHeaders.h
   LINK_LIBRARIES
+    overlays
     orxonox
   SOURCE_FILES ${PICKUP_SRC_FILES}
Index: code/trunk/src/modules/pickup/PickupManager.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupManager.cc	(revision 11176)
+++ code/trunk/src/modules/pickup/PickupManager.cc	(revision 11353)
@@ -41,4 +41,7 @@
 #include "network/Host.h"
 #include "network/NetworkFunctionIncludes.h"
+#include "core/input/KeyBinderManager.h"    //for keybinding
+#include "core/input/KeyBinder.h"           //for keybinding
+#include "core/command/ConsoleCommandIncludes.h"
 
 #include "infos/PlayerInfo.h"
@@ -48,4 +51,5 @@
 #include "CollectiblePickup.h"
 #include "PickupRepresentation.h"
+#include "overlays/hud/HUDPickupSystem.h"
 
 namespace orxonox
@@ -63,4 +67,6 @@
 
     RegisterAbstractClass(PickupManager).inheritsFrom<PickupListener>();
+
+    SetConsoleCommand("useUnusePickup", &PickupManager::useUnusePickup).addShortcut().setActive(true);
 
     /**
@@ -260,4 +266,7 @@
         assert(pickup);
 
+        for (HUDPickupSystem* hud : ObjectList<HUDPickupSystem>())
+            pickupSystem = hud;
+        
         if(!GameMode::isMaster()) // If this is neither standalone nor the server.
             return;
@@ -283,8 +292,14 @@
         if(pickedUp) // If the Pickupable has changed to picked up, it is added to the required lists.
         {
-            index = this->getPickupIndex(); // Ge a new identifier (index) for the Pickupable.
+            index = this->getPickupIndex(); // Get a new identifier (index) for the Pickupable.
             // Add the Pickupable to the indexes_ and pickups_ lists.
             this->indexes_[pickup] = index;
             this->pickups_[index] = pickup;
+
+            this->picks.push_back(pickup);
+
+            if(pickupSystem)
+                pickupSystem->updatePickupList(picks, indexes_);
+            
         }
         else // If it was dropped, it is removed from the required lists.
@@ -294,7 +309,12 @@
             index = it->second;
 
-            // Remove the Pickupable from the indexes_ and pickups_ list.
-            this->indexes_.erase(it);
-            this->pickups_.erase(index);
+            this->indexes_.erase(pickup);
+            this->pickups_.erase(index); //set to null, so that can be identified as free slot by getPickupIndex()
+
+
+            this->picks.erase(std::remove(this->picks.begin(), this->picks.end(), pickup), this->picks.end()); //remove pickup from vector
+
+            if(pickupSystem)
+                pickupSystem->removePickup(pickup);
         }
 
@@ -323,4 +343,31 @@
 
     }
+
+    //This function is called by the command line or by the key binding
+    //it uses or unuses the pickup, depending on its current state
+    //or drops it (depends what you comment/uncomment)
+    void PickupManager::useUnusePickup(uint32_t index) 
+    {
+        PickupManager& manager = PickupManager::getInstance();
+
+        if(!manager.pickups_.count(index)) return; //if pickup is no longer here, dont do anything
+
+        Pickupable* pickup=manager.pickups_.find(index)->second;
+        if(pickup==nullptr)
+        {
+            return;                       //pickup does not exist
+        }
+
+        //if the pickup should be dropped upon key press
+        manager.dropPickup(index);
+
+        //if the pickup should be used/unused upon key press
+
+        // if(pickup->isUsed())
+        //     manager.usePickup(index, false);
+        // else
+        //     manager.usePickup(index, true);
+    }
+
 
     /**
@@ -402,5 +449,8 @@
             Pickupable* pickupable = this->pickups_.find(pickup)->second;
             if(pickupable != nullptr)
+            {
                 pickupable->drop();
+
+            }
         }
         // If we're neither server nor standalone we drop the pickup by calling dropPickupNetworked() of the PickupManager on the server.
@@ -495,6 +545,6 @@
     /**
     @brief
-        Get a new index for a Pickupable.
-        This will work as long as the number of Pickupables that are picked up is sufficiently small and as long as they don't exist forever.
+        Get a new index between 0 and 9 for a Pickupable.
+        If all slots are occupied, the Pickupable in the first slot will be dropped.
     @return
         Returns the new index.
@@ -502,7 +552,14 @@
     uint32_t PickupManager::getPickupIndex(void)
     {
-        if(this->pickupHighestIndex_ == uint32_t(~0x0)-1) // If we've reached the highest possible number, we wrap around.
-            this->pickupHighestIndex_ = 0;
-        return this->pickupHighestIndex_++;
+        //check if there are free slots available
+
+        for(uint32_t i=0; i<10; i++)
+        {
+            if(!pickups_.count(i)) return i;
+        }
+        //all slots are full and we have to drop sth
+        orxout(internal_info, context::pickups) << "everything was full and we have now dropped the first element" << endl;
+        this->dropPickup(0);
+        return 0;
     }
 
Index: code/trunk/src/modules/pickup/PickupManager.h
===================================================================
--- code/trunk/src/modules/pickup/PickupManager.h	(revision 11176)
+++ code/trunk/src/modules/pickup/PickupManager.h	(revision 11353)
@@ -42,7 +42,8 @@
 
 #include "PickupRepresentation.h"
-
+#include "interfaces/Pickupable.h"
 #include "util/Singleton.h"
 #include "interfaces/PickupListener.h"
+#include "overlays/hud/HUDPickupSystem.h"
 
 namespace orxonox // tolua_export
@@ -135,4 +136,5 @@
 
             void dropPickup(uint32_t pickup); //!< Drop the input Pickupable.
+            static void useUnusePickup(uint32_t index); //tolua_export
             void usePickup(uint32_t pickup, bool use); //!< Use (or unuse) the input Pickupable.
              /**
@@ -147,6 +149,10 @@
             static void dropPickupNetworked(uint32_t pickup); //!< Helper method to drop the input pickup on the server.
             static void usePickupNetworked(uint32_t pickup, bool use); //!< Helper method to use (or unuse) the input Pickupable on the server.
+            void setPickupSystem(HUDPickupSystem* system);
 
         private:
+            HUDPickupSystem* pickupSystem;
+            std::vector<Pickupable*> picks;
+
             static PickupManager* singletonPtr_s;
             static const std::string guiName_s; //!< The name of the PickupInventory
@@ -166,5 +172,5 @@
             void updateGUI(void); //!< Updates the PickupInventory GUI.
             uint32_t getPickupIndex(void); //!< Get a new index for a Pickupable.
-
+            
     }; // tolua_export
 
Index: code/trunk/src/modules/pickup/items/SpeedPickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/SpeedPickup.h	(revision 11176)
+++ code/trunk/src/modules/pickup/items/SpeedPickup.h	(revision 11353)
@@ -48,5 +48,5 @@
         A Pickup which can manipulate the Speed of a Pawn.
 
-        There are 5 parameters that can be cosen:
+        There are 5 parameters that can be chosen:
         - The @b speedMultiply, specifies a factor by which the Spaceships speed is multiplied. The default is 1.
         - The @b speedAdd, specifies a value that is added to the speed of the Spaceship. The default is 0.
Index: code/trunk/src/orxonox/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/CMakeLists.txt	(revision 11176)
+++ code/trunk/src/orxonox/CMakeLists.txt	(revision 11353)
@@ -20,4 +20,5 @@
 INCLUDE_DIRECTORIES(
   ${CMAKE_SOURCE_DIR}/src/libraries
+  ${CMAKE_SOURCE_DIR}/src/modules
   ${CMAKE_CURRENT_SOURCE_DIR}
 )
Index: code/trunk/src/orxonox/controllers/HumanController.h
===================================================================
--- code/trunk/src/orxonox/controllers/HumanController.h	(revision 11176)
+++ code/trunk/src/orxonox/controllers/HumanController.h	(revision 11353)
@@ -69,5 +69,4 @@
             void stopBoosting(void);
 
-
             static void greet();
             static void switchCamera();
Index: code/trunk/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSLevel.cc	(revision 11176)
+++ code/trunk/src/orxonox/gamestates/GSLevel.cc	(revision 11353)
@@ -50,4 +50,5 @@
 #include "PlayerManager.h"
 #include "GSRoot.h"
+// #include "overlays/hud/HUDPickupSystem.h"
 
 namespace orxonox
@@ -126,4 +127,11 @@
             InputManager::getInstance().leaveState("game");
 
+        // HUDPickupSystem* pickupSystem;
+
+        // for (HUDPickupSystem* hud : ObjectList<HUDPickupSystem>())
+        //     pickupSystem = hud;
+
+        // pickupSystem->repaint=false;
+
         // disconnect all HumanPlayers
         PlayerManager::getInstance().disconnectAllClients();
Index: code/trunk/src/orxonox/gamestates/GSLevel.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSLevel.h	(revision 11176)
+++ code/trunk/src/orxonox/gamestates/GSLevel.h	(revision 11353)
@@ -31,4 +31,5 @@
 
 #include "OrxonoxPrereqs.h"
+// #include "overlays/OverlaysPrereqs.h"
 
 #include <string>
Index: code/trunk/src/orxonox/interfaces/Pickupable.h
===================================================================
--- code/trunk/src/orxonox/interfaces/Pickupable.h	(revision 11176)
+++ code/trunk/src/orxonox/interfaces/Pickupable.h	(revision 11353)
@@ -96,4 +96,11 @@
 
             /**
+            @brief Check whether the Pickupable is in the process of being destroyed.
+            @return Returns true if so.
+            */
+            inline bool isBeingDestroyed(void)
+                { return this->beingDestroyed_; }
+                
+            /**
             @brief Returns whether the Pickupable is currently picked up.
             @return Returns true if the Pickupable is currently picked up, false if not.
@@ -155,11 +162,4 @@
 
             /**
-            @brief Check whether the Pickupable is in the process of being destroyed.
-            @return Returns true if so.
-            */
-            inline bool isBeingDestroyed(void)
-                { return this->beingDestroyed_; }
-
-            /**
             @brief Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
                    This method must be implemented by any class directly inheriting from Pickupable.
