Index: data/media/gui/layouts/PickupInventory.layout
===================================================================
--- data/media/gui/layouts/PickupInventory.layout	(revision 5525)
+++ data/media/gui/layouts/PickupInventory.layout	(revision 5526)
@@ -2,8 +2,8 @@
 <GUILayout>
     <Window Type="TaharezLook/FrameWindow" Name="orxonox/Inventory">
-        <Property Name="UnifiedMinSize" Value="{{0.4,0},{0.3,0}}" />
-        <Property Name="UnifiedMaxSize" Value="{{0.8,0},{0.8,0}}" />
-        <Property Name="UnifiedPosition" Value="{{0.3,0},{0.35,0}}" />
-        <Property Name="UnifiedSize" Value="{{0.4,0},{0.3,0}}" />
+        <Property Name="UnifiedMinSize" Value="{{0.0,385},{0.0,200}}" />
+        <Property Name="UnifiedMaxSize" Value="{{0.0,385},{0.0,200}}" />
+        <Property Name="UnifiedPosition" Value="{{0.5,-100},{0.5,-85}}" />
+        <Property Name="UnifiedSize" Value="{{0.0,385},{0.0,200}}" />
         <Property Name="Text" Value="Inventory" />
         <Property Name="CloseButtonEnabled" Value="False" />
@@ -18,35 +18,11 @@
             <Window Type="TaharezLook/ScrollablePane" Name="orxonox/Inventory/TabControl/TabEquipment">
                 <Property Name="Text" Value="Equipment" />
-                <Property Name="UnifiedPosition" Value="{{0,0},{0,0}}"/>
-                <Property Name="UnifiedSize" Value="{{1.0,0},{1.0,0}}"/>
-                
-                <Window Type="TaharezLook/Button" Name="orxonox/Inventory/equipmentButton/1">
-                    <Property Name="UnifiedPosition" Value="{{0.0,6},{0.0,6}}"/>
-                    <Property Name="UnifiedSize" Value="{{0.2,-12},{0.2,-12}}"/>
-                    <Property Name="Text" Value="1"/>
-                </Window>
-                <Window Type="TaharezLook/Button" Name="orxonox/Inventory/equipmentButton/2">
-                    <Property Name="UnifiedPosition" Value="{{0.2,6},{0.0,6}}"/>
-                    <Property Name="UnifiedSize" Value="{{0.2,-12},{0.2,-12}}"/>
-                    <Property Name="Text" Value="2"/>
-                </Window>
-                <Window Type="TaharezLook/Button" Name="orxonox/Inventory/equipmentButton/3">
-                    <Property Name="UnifiedPosition" Value="{{0.4,6},{0.0,6}}"/>
-                    <Property Name="UnifiedSize" Value="{{0.2,-12},{0.2,-12}}"/>
-                    <Property Name="Text" Value="3"/>
-                </Window>
-                <Window Type="TaharezLook/Button" Name="orxonox/Inventory/equipmentButton/4">
-                    <Property Name="UnifiedPosition" Value="{{0.6,6},{0.0,6}}"/>
-                    <Property Name="UnifiedSize" Value="{{0.2,-12},{0.2,-12}}"/>
-                    <Property Name="Text" Value="4"/>
-                </Window>
-                <Window Type="TaharezLook/Button" Name="orxonox/Inventory/equipmentButton/5">
-                    <Property Name="UnifiedPosition" Value="{{0.8,6},{0.0,6}}"/>
-                    <Property Name="UnifiedSize" Value="{{0.2,-12},{0.2,-12}}"/>
-                    <Property Name="Text" Value="5"/>
-                </Window>
+                <Property Name="UnifiedPosition" Value="{{0.0,3},{0.0,3}}"/>
+                <Property Name="UnifiedSize" Value="{{1.0,-6},{1.0,-6}}"/>
             </Window>
             <Window Type="TaharezLook/ScrollablePane" Name="orxonox/Inventory/TabControl/TabUsable">
                 <Property Name="Text" Value="Usable" />
+                <Property Name="UnifiedPosition" Value="{{0.0,3},{0.0,3}}"/>
+                <Property Name="UnifiedSize" Value="{{1.0,-6},{1.0,-6}}"/>
             </Window>
             
Index: data/media/gui/scripts/PickupInventory.lua
===================================================================
--- data/media/gui/scripts/PickupInventory.lua	(revision 5525)
+++ data/media/gui/scripts/PickupInventory.lua	(revision 5526)
@@ -1,3 +1,12 @@
 layoutPath = "PickupInventory.layout"
+
+-- variables
+local winMgr = CEGUI.WindowManager:getSingleton()
+local lastEquipmentCount_ = 0
+local lastUsableCount_ = 0
+
+local currentUsableID_ = -1
+local lastUsedEquipID_ = 0
+local lastUsedUsableID_ = 0
 
 -- events
@@ -7,8 +16,41 @@
 end
 function frmUpdate(e)
+    local equipCount = orxonox.PickupInventory:getEquipmentCount()
+    local usableCount = orxonox.PickupInventory:getUsableCount()
     
+    if equipCount ~= lastEquipmentCount_ or usableCount ~= lastUsableCount_ then
+        updateTabs()
+    end
 end
 
-function noButtonClicked(e)
-    orxonox.PickupInventory:toggleInventory()
+function itemClicked(e)
+    local w = CEGUI.toWindowEventArgs(e).window
+    local name = w:getName()
+    local t = name:sub(25, 27)
+    local i = name:sub(29)
+    
+    if t == "equ" then
+        
+    end
+    
+    if t == "use" then
+        if currentUsableID_ >= 0 then
+            winMgr:getWindow("orxonox/Inventory/Title/use/" .. currentUsableID_):setProperty("TextColours", "tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF")
+        end
+        orxonox.PickupInventory:selectUsable(tonumber(i))
+        currentUsableID_ = tonumber(i)
+        winMgr:getWindow("orxonox/Inventory/Title/use/" .. i):setProperty("TextColours", "tl:FFFF4444 tr:FFFF4444 bl:FFFF4444 br:FFFF4444")
+    end
 end
+
+-- methods
+function updateTabs()
+    local eqWin = winMgr:getWindow("orxonox/Inventory/TabControl/TabEquipment")
+    local usWin = winMgr:getWindow("orxonox/Inventory/TabControl/TabUsable")
+    orxonox.PickupInventory:clearInventory(winMgr, lastEquipmentCount_, lastUsableCount_)
+    orxonox.PickupInventory:updateTabs(winMgr, eqWin, usWin)
+    
+    currentUsableID_ = orxonox.PickupInventory:getCurrentUsableIndex()
+    lastEquipmentCount_ = orxonox.PickupInventory:getEquipmentCount()
+    lastUsableCount_ = orxonox.PickupInventory:getUsableCount()
+end
Index: data/media/levels/pickuptest.oxw
===================================================================
--- data/media/levels/pickuptest.oxw	(revision 5525)
+++ data/media/levels/pickuptest.oxw	(revision 5526)
@@ -15,9 +15,9 @@
     
     <Template name="jumpTest" baseclass="Jump">
-        <Jump velocity="0,0,500" jumpsAvailable="10" />
+        <Jump velocity="0,0,500" jumpsAvailable="1" guiImage="decal.jpg" guiText="TEST" />
     </Template>
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
 
-    <PickupSpawner item="jumpTest" triggerDistance="20" respawnTime="10" position="100, 0, 0">
+    <PickupSpawner item="jumpTest" triggerDistance="20" respawnTime="2" position="100, 0, 0">
         <attached>
             <Model mesh="sphere.mesh" scale="3.0" />
