Index: code/branches/releasetodo/data/gui/layouts/SingleplayerMenu.layout
===================================================================
--- code/branches/releasetodo/data/gui/layouts/SingleplayerMenu.layout	(revision 7625)
+++ code/branches/releasetodo/data/gui/layouts/SingleplayerMenu.layout	(revision 7626)
@@ -15,8 +15,20 @@
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
             <Property Name="VertFormatting" Value="TopAligned" />
-            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2875,0},{0.75,0},{0.6375,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2875,0},{0.75,0},{0.7,0}}" />
             <Window Type="MenuWidgets/Listbox" Name="orxonox/SingleplayerLevelListbox" >
                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.92,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.85,0}}" />
+            </Window>
+            <Window Type="MenuWidgets/RadioButton" Name="orxonox/SingleplayerShowRestrictedButton" >
+                <Property Name="Text" Value="show only restricted" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.87,0},{0.5,0},{.97,0}}" />
+                <Event Name="SelectStateChanged" Function="SingleplayerMenu.SingleplayerShowRestrictedButton_clicked"/>
+            </Window>
+            <Window Type="MenuWidgets/RadioButton" Name="orxonox/SingleplayerShowAllButton" >
+                <Property Name="Text" Value="show all" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.65,0},{0.87,0},{0.85,0},{.97,0}}" />
+                <Event Name="SelectStateChanged" Function="SingleplayerMenu.SingleplayerShowAllButton_clicked"/>
             </Window>
         </Window>
@@ -24,5 +36,5 @@
             <Property Name="Text" Value="Start" />
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.6625,0},{0.4875,0},{0.7125,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.725,0},{0.4875,0},{0.775,0}}" />
             <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerStartButton_clicked"/>
         </Window>
@@ -30,5 +42,5 @@
             <Property Name="Text" Value="Back" />
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.6625,0},{0.7125,0},{0.7125,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.725,0},{0.7125,0},{0.775,0}}" />
             <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerBackButton_clicked"/>
         </Window>
Index: code/branches/releasetodo/data/gui/scripts/MultiplayerMenu.lua
===================================================================
--- code/branches/releasetodo/data/gui/scripts/MultiplayerMenu.lua	(revision 7625)
+++ code/branches/releasetodo/data/gui/scripts/MultiplayerMenu.lua	(revision 7626)
@@ -2,4 +2,8 @@
 
 local P = createMenuSheet("MultiplayerMenu")
+
+P.levelList = {}
+P.itemList = {}
+P.showAll = false
 
 function P.onLoad()
@@ -69,33 +73,41 @@
 
 function P.showLevelList()
-    local listbox = winMgr:getWindow("orxonox/MultiplayerListbox")
-    CEGUI.toListbox(listbox):resetList()
+    P.createLevelList()
+end
+
+function P.createLevelList()
+    P.levelList = {}
+    P.itemList = {}
+    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/MultiplayerListbox"))
+    listbox:resetList()
     local preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
-    orxonox.LevelManager:getInstance():compileAvailableLevelList()
-    local levelList = {}
+    local size = orxonox.LevelManager:getInstance():getNumberOfLevels()
     local index = 0
-    local level = ""
-    while true do
+    local level = nil
+    while index < size do
         level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
-        if level == "" then
-            break
+        if level ~= nil then
+            if P.showAll or not level:hasTag("test") then
+                table.insert(P.levelList, level)
+            end
         end
-        table.insert(levelList, level)
         index = index + 1
     end
-    table.sort(levelList)
-    index = 1
-    for k,v in pairs(levelList) do
-        local item = CEGUI.createListboxTextItem(v)
+    --TODO: Reintroduce sorting, if needed.
+    --table.sort(levelList)
+    for k,v in pairs(P.levelList) do
+        local item = CEGUI.createListboxTextItem(v:getName())
         item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
-        item:setID(index)
-        index = index + 1
-        CEGUI.toListbox(listbox):addItem(item)
-        if v .. ".oxw" == preselect then
+        listbox:addItem(item)
+        if v:getXMLFilename() == preselect then
             listbox:setItemSelectState(item, true)
         end
+        P.itemList[k] = listbox:getListboxItemFromIndex(k-1)
+        --TODO: The description as tooltip would be nice.
+        --local lItem = tolua.cast("CEGUI::ListboxItem", P.itemList[k])
+        --lItem:setTooltipText(v:getDescription())
     end
-    end
-    
+end
+
 function P.showServerList()
     local listbox = winMgr:getWindow("orxonox/MultiplayerListbox")
Index: code/branches/releasetodo/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- code/branches/releasetodo/data/gui/scripts/SingleplayerMenu.lua	(revision 7625)
+++ code/branches/releasetodo/data/gui/scripts/SingleplayerMenu.lua	(revision 7626)
@@ -3,35 +3,71 @@
 local P = createMenuSheet("SingleplayerMenu")
 
+P.levelList = {}
+P.itemList = {}
+P.showAll = false
+
 function P.onLoad()
-    listbox = winMgr:getWindow("orxonox/SingleplayerLevelListbox")
-    preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
-    size = orxonox.LevelManager:getInstance():getNumberOfLevels()
-    local levelList = {}
+    local window = winMgr:getWindow("orxonox/SingleplayerShowRestrictedButton")
+    local button = tolua.cast(window,"CEGUI::RadioButton")
+    button:setSelected(true)
+    P.createLevelList()
+end
+
+function P.createLevelList()
+    P.levelList = {}
+    P.itemList = {}
+    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/SingleplayerLevelListbox"))
+    listbox:resetList()
+    local preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
+    local size = orxonox.LevelManager:getInstance():getNumberOfLevels()
     local index = 0
-    local level = ""
+    local level = nil
     while index < size do
-      level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
-      table.insert(levelList, level)
-      index = index + 1
+        level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
+        if level ~= nil then
+            if P.showAll or not level:hasTag("test") then
+                table.insert(P.levelList, level)
+            end
+        end
+        index = index + 1
     end
-    table.sort(levelList)
-    for k,v in pairs(levelList) do
-        item = CEGUI.createListboxTextItem(v)
+    --TODO: Reintroduce sorting, if needed.
+    --table.sort(levelList)
+    for k,v in pairs(P.levelList) do
+        local item = CEGUI.createListboxTextItem(v:getName())
         item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
-        CEGUI.toListbox(listbox):addItem(item)
-        if v .. ".oxw" == preselect then
+        listbox:addItem(item)
+        if v:getXMLFilename() == preselect then
             listbox:setItemSelectState(item, true)
         end
+        P.itemList[k] = listbox:getListboxItemFromIndex(k-1)
+        --TODO: The description as tooltip would be nice.
+        --local lItem = tolua.cast("CEGUI::ListboxItem", P.itemList[k])
+        --lItem:setTooltipText(v:getDescription())
     end
-
 end
 
 function P.SingleplayerStartButton_clicked(e)
-    local choice = CEGUI.toListbox(winMgr:getWindow("orxonox/SingleplayerLevelListbox")):getFirstSelectedItem()
-    if choice then
-        orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
-        orxonox.execute("startGame")
-        hideAllMenuSheets()
+    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/SingleplayerLevelListbox"))
+    local choice = listbox:getFirstSelectedItem()
+    if choice ~= nil then
+        local index = listbox:getItemIndex(choice)
+        local level = P.levelList[index+1]
+        if level ~= nil then
+            orxonox.LevelManager:getInstance():setDefaultLevel(level:getXMLFilename())
+            orxonox.execute("startGame")
+            hideAllMenuSheets()
+        end
     end
+end
+
+function P.SingleplayerShowRestrictedButton_clicked(e)
+    P.showAll = false
+    P.createLevelList()
+end
+
+function P.SingleplayerShowAllButton_clicked(e)
+    P.showAll = true
+    P.createLevelList()
 end
 
