Index: code/branches/Highscore_HS16/data/gui/layouts/HighscoreMenu.layout
===================================================================
--- code/branches/Highscore_HS16/data/gui/layouts/HighscoreMenu.layout	(revision 11253)
+++ code/branches/Highscore_HS16/data/gui/layouts/HighscoreMenu.layout	(revision 11254)
@@ -20,5 +20,5 @@
                 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.105,0},{0.95,0},{0.99,0}}" />
             </Window>
-            <Window Type="MenuWidgets/StaticText" Name="orxonox/HighscoreMenuWrapper" >
+            <!--<Window Type="MenuWidgets/StaticText" Name="orxonox/HighscoreMenuWrapper" >
                 <Property Name="InheritsAlpha" Value="False" />
                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
@@ -37,5 +37,7 @@
                     <Property Name="VertScrollPosition" Value="0" />
                 </Window>
+            
             </Window>
+            -->
         </Window>
         <Window Type="MenuWidgets/Button" Name="orxonox/HighscoreBackButton" >
Index: code/branches/Highscore_HS16/data/gui/scripts/HighscoreMenu.lua
===================================================================
--- code/branches/Highscore_HS16/data/gui/scripts/HighscoreMenu.lua	(revision 11253)
+++ code/branches/Highscore_HS16/data/gui/scripts/HighscoreMenu.lua	(revision 11254)
@@ -15,4 +15,6 @@
 P.resetWidth = 0
 P.spaceWidth = 0
+P.imageHeight = 50
+P.textHeight = 30
 
 function P.onLoad()
@@ -26,12 +28,9 @@
 	P.linesList = {}
 
-	--Calculate design parameters:
-    P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/MiscConfigMenu/MiscConfigPane/SampleWindow")
-    P.sampleWindow:setText("SampleText")
 
     -- create tabs with desired tab as argument (nil for all)
     
-    P.createFilterTab("Gametypes", "gametype")
-    P.createFilterTab("Missions", "mission")
+    P.createFilterTab("Game1", "game1")
+    P.createFilterTab("Game2", "game2")
     --P.createFilterTab("Minigames", "minigame")
     --P.createFilterTab("Showcases", "showcase")
@@ -40,36 +39,5 @@
     --P.createFilterTab("Show All", nil)
 
-    -- update description and screenshot boxes
-    --P.SingleplayerSelectionChanged()
-
-    local size = getMinTextSize(P.sampleWindow)
-    P.lineHeight = size[1]
-
-    P.playerWidth = 0
-    for k,v in pairs(P.scoreList) do
-        P.sampleWindow:setText(P.nameList[k])
-        size = getMinTextSize(P.sampleWindow)
-        if size[2] > P.playerWidth then
-            P.playerWidth = size[2]
-        end
-    end
-
-    P.sampleWindow:setText("reset")
-    size = getMinTextSize(P.sampleWindow)
-    P.resetWidth = size[2]+20
-
-    P.spaceWidth = 10
     
-    local pane = tolua.cast(winMgr:getWindow("orxonox/HighscoreMenuPane"), "CEGUI::ScrollablePane")
-    size = pane:getViewableArea()
-
-    P.editboxWidth = size:getWidth() - P.playerWidth - P.resetWidth - 5*P.spaceWidth
-
-    P.createLines()
-
-    P:setButton(1, 1, {
-            ["button"] = winMgr:getWindow("orxonox/HighscoreBackButton"),
-            ["callback"]  = P.HighscoreBackButton_clicked
-    })
 end
 
@@ -89,16 +57,55 @@
     
     -- create new tab window with desired name
-	local default = CEGUI.toListbox(winMgr:createWindow("DefaultWindow", tabName))
+	local default = (winMgr:createWindow("DefaultWindow", tabName))
     default:setText(name)
+    default:setProperty("UnifiedMaxSize", "{{1,0},{1,0}}")
+    default:setProperty("UnifiedAreaRect", "{{0,0},{0,0},{1,0},{1,0}}")
+    local pane = winMgr:createWindow("MenuWidgets/ScrollablePane", tabName .. "pane") 
+    pane:setSize(CEGUI.UVector2(CEGUI.UDim(1,0),CEGUI.UDim(1,0)))
+    default:addChildWindow(pane)
+
+   
+    local offset = 2
+    for k,v in pairs(P.scoreList) do
+        local line = P.createPickupEntry(tabName .. k,k,tag)
+        table.insert(P.linesList, line)
+        line:setYPosition(CEGUI.UDim(0,offset))
+        offset = offset + line:getHeight():asAbsolute(1)+2
+        pane:addChildWindow(line)
+    end
+
  
     local tabControl = winMgr:getWindow("orxonox/HighscoreTabControl")
     orxonox.GUIManager:subscribeEventHelper(tabControl, "TabSelectionChanged", P.name..".HighscoreSelectionChanged")
     --if listbox:getItemCount() > 0 then
-        tabControl:addChildWindow(tabName)
+        tabControl:addChildWindow(default)
     --end
 
     
 end
+function P.createPickupEntry(parent,k,tag)
+   
+    local name = "orxonox/HiscoreEntry" .. parent
 
+    local item = winMgr:createWindow("DefaultWindow", name)
+    item:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0), CEGUI.UDim(0, P.imageHeight)))
+    item:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0)))
+
+    local player = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Player")
+    player:setText(P.nameList[k].. tag)
+    player:setPosition(CEGUI.UVector2(CEGUI.UDim(0.005,0), CEGUI.UDim(0,0)))
+    player:setSize(CEGUI.UVector2(CEGUI.UDim(0.49, 0), CEGUI.UDim(0, P.imageHeight)))
+    
+    item:addChildWindow(player)
+    	
+    local score = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Score")
+    score:setText(P.scoreList[k])
+    score:setPosition(CEGUI.UVector2(CEGUI.UDim(0.5,0), CEGUI.UDim(0,0)))
+    score:setSize(CEGUI.UVector2(CEGUI.UDim(0.495, 0), CEGUI.UDim(0, P.imageHeight)))
+    
+    item:addChildWindow(score)
+
+    return item
+end
 function P.HighscoreGetSelectedLevel()
     -- choose the active listbox
@@ -117,6 +124,6 @@
 
 function P.HighscoreSelectionChanged(e)
-	local pane = tolua.cast(winMgr:getWindow("orxonox/HighscoreMenuPane"), "CEGUI::ScrollablePane")
-	pane:moveToFront()
+	--local pane = tolua.cast(winMgr:getWindow("orxonox/HighscoreMenuPane"), "CEGUI::ScrollablePane")
+	--pane:moveToFront()
     --[[local levelDescription = winMgr:getWindow("orxonox/SingleplayerLevelDescription")
     local configButton = winMgr:getWindow("orxonox/SingleplayerConfigButton")
@@ -142,60 +149,4 @@
 end
 
-function P.createLine(k,tag)
-
-	local tabName = k
-
-	if tag ~= nil then
-        tabName = tabName..tag
-    end
-
-    -- content window for the entire line
-    local line = winMgr:createWindow("DefaultWindow", "orxonox/HighscoreMenuPane/Score" .. tabName)
-    line:setHeight(CEGUI.UDim(0, P.lineHeight))
-    line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, P.lineHeight*(k-1))))
-
-    local pane = tolua.cast(winMgr:getWindow("orxonox/HighscoreMenuPane"), "CEGUI::ScrollablePane")
-    local half = (pane:getViewableArea()):getWidth() * 0.5
-    local offset = half * 0.01
-    -- config name
-    local player = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/HighscoreMenuPane/Score" .. tabName .. "/Player")
-    player:setText(P.nameList[k])
-    player:setSize(CEGUI.UVector2(CEGUI.UDim(0, half-offset), CEGUI.UDim(1, 0)))
-    player:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0)))
-    line:addChildWindow(player)
-    
-
-    -- config value (editable)
-
-    local playerValue = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/HighscoreMenuPane/Score" .. tabName .. "/Value")
-    --playerValue:setProperty("ReadOnly", "set:False")
-    --local value = orxonox.CommandExecutor:query("getConfig " .. P.commandList[k])SS
-    playerValue:setText(P.scoreList[k])
-    playerValue:setSize(CEGUI.UVector2(CEGUI.UDim(0, half-offset), CEGUI.UDim(1, 0)))
-    playerValue:setPosition(CEGUI.UVector2(CEGUI.UDim(0, half+offset), CEGUI.UDim(0, 0)))
-   -- enable the reset button if the value changed
-    orxonox.GUIManager:subscribeEventHelper(playerValue, "TextAccepted", P.name .. ".MiscConfigEditbox_textAccepted")
-    line:addChildWindow(playerValue)
-    
-    
-
-    line:setWidth(CEGUI.UDim(0, 2*half))
-
-    return line
-end
-
-function P.createLines()
-    local window = winMgr:getWindow("orxonox/HighscoreMenuPane")
-
-    for k,v in pairs(P.scoreList) do
-        local line = P.createLine(k,nil)
-        table.insert(P.linesList, line)
-        window:addChildWindow(line)
-    end
-
-    local pane = tolua.cast(window, "CEGUI::ScrollablePane")
-    pane:setVerticalStepSize(getScrollingStepSize(window))
-end
-
 
 function P.HighscoreBackButton_clicked(e)
