Index: code/branches/presentation2011/data/gui/layouts/CreditsMenu.layout
===================================================================
--- code/branches/presentation2011/data/gui/layouts/CreditsMenu.layout	(revision 8976)
+++ code/branches/presentation2011/data/gui/layouts/CreditsMenu.layout	(revision 8977)
@@ -7,5 +7,5 @@
         <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
         <Window Type="MenuWidgets/StaticText" Name="orxonox/CreditsWindow" >
-            <Property Name="Text" Value="Keybindings" />
+            <Property Name="Text" Value="Credits" />
             <Property Name="Alpha" Value="0.8" />
             <Property Name="InheritsAlpha" Value="False" />
@@ -15,5 +15,4 @@
             <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.2125,0},{0.85,0},{0.6375,0}}" />
             <Window Type="MenuWidgets/StaticText" Name="orxonox/CreditsMenuWrapper" >
-                <Property Name="TextColours" Value="FF4444FF" />
                 <Property Name="InheritsAlpha" Value="False" />
                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
@@ -27,5 +26,5 @@
                     <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                     <Property Name="HorzOverlapSize" Value="0.01" />
-                    <Property Name="UnifiedAreaRect" Value="{{0.005,0},{0.01,0},{0.995,0},{0.99,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0.997,0},{0.997,0}}" />
                     <Property Name="VertOverlapSize" Value="0.01" />
                     <Property Name="HorzScrollPosition" Value="0" />
@@ -38,14 +37,13 @@
                         <Property Name="VertFormatting" Value="TopAligned" />
                         <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
-                        <Property Name="Text">wird sowieso nicht gelesen
-Orxonox version 0.0.3
-
-Programming Language:  C++ - lua - tcl
-Environment:  OpenAL - Ogre - OIS - CEGUI - enet - ODE
-Licence:  GNU General Public Licence - Creative Commons
-
-das ist mein text höhö
-
-http://www.orxonox.net
+                        <Property Name="Text">Orxonox version 0.0.3
+    
+    Programming Language:  C++ - lua - tcl
+    Environment:  OpenAL - Ogre - OIS - CEGUI - enet - ODE
+    Licence:  GNU General Public Licence - Creative Commons
+    
+    http://www.orxonox.net
+    
+    Credits:
                       </Property>
                     </Window>
@@ -61,7 +59,2 @@
     </Window>
 </GUILayout>
-
-
-
-
-
Index: code/branches/presentation2011/data/gui/layouts/MiscConfigMenu.layout
===================================================================
--- code/branches/presentation2011/data/gui/layouts/MiscConfigMenu.layout	(revision 8976)
+++ code/branches/presentation2011/data/gui/layouts/MiscConfigMenu.layout	(revision 8977)
@@ -2,8 +2,10 @@
 
 <GUILayout >
-    <Window Type="DefaultWindow" Name="orxonox/MiscConfigMenu/Background" >
+    <Window Type="MenuWidgets/StaticImage" Name="orxonox/MiscConfigMenu/Background" >
+        <Property Name="FrameEnabled" Value="False" />
         <Property Name="InheritsAlpha" Value="False" />
         <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
         <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Property Name="BackgroundEnabled" Value="False" />
         <Window Type="MenuWidgets/StaticText" Name="orxonox/MicsConfigMenu/ConfigWindow" >
             <Property Name="Text" Value="Miscellaneous" />
@@ -34,9 +36,15 @@
             </Window>
         </Window>
-        <Window Type="MenuWidgets/Button" Name="orxonox/MiscConfigMenu/MiscConfigBackButton" >
-            <Property Name="Text" Value="Back" />
+        <Window Type="MenuWidgets/Button" Name="orxonox/MiscConfigMenu/CancelButton" >
+            <Property Name="Text" Value="Cancel" />
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" />
-            <Event Name="Clicked" Function="MiscConfigMenu.MiscConfigBackButton_clicked"/>
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.725,0},{0.4,0},{0.775,0}}" />
+            <Event Name="Clicked" Function="MiscConfigMenu.MiscConfigCancelButton_clicked"/>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/MiscConfigMenu/OKButton" >
+            <Property Name="Text" Value="OK" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.6,0},{0.725,0},{0.75,0},{0.775,0}}" />
+            <Event Name="Clicked" Function="MiscConfigMenu.MiscConfigOKButton_clicked"/>
         </Window>
     </Window>
Index: code/branches/presentation2011/data/gui/layouts/SingleplayerConfigMenu.layout
===================================================================
--- code/branches/presentation2011/data/gui/layouts/SingleplayerConfigMenu.layout	(revision 8977)
+++ code/branches/presentation2011/data/gui/layouts/SingleplayerConfigMenu.layout	(revision 8977)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="MenuWidgets/StaticImage" Name="orxonox/SingleplayerConfigMenu/Background" >
+        <Property Name="FrameEnabled" Value="False" />
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Property Name="BackgroundEnabled" Value="False" />
+        <Window Type="MenuWidgets/StaticText" Name="orxonox/SingleplayerConfigMenu/ConfigWindow" >
+            <Property Name="Text" Value="Config" />
+            <Property Name="Alpha" Value="0.8" />
+            <Property Name="InheritsAlpha" Value="False" />
+            <Property Name="HorzFormatting" Value="HorzCentred" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="VertFormatting" Value="TopAligned" />
+            <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.2125,0},{0.85,0},{0.6375,0}}" />
+            <Window Type="MenuWidgets/StaticText" Name="orxonox/SingleplayerConfigMenu/Wrapper" >
+                <Property Name="TextColours" Value="FF4444FF" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="HorzFormatting" Value="HorzCentred" />
+                <Property Name="VertFormatting" Value="TopAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.92,0}}" />
+                <Window Type="MenuWidgets/ScrollablePane" Name="orxonox/SingleplayerConfigMenu/MiscConfigPane" >
+                    <Property Name="ContentArea" Value="l:0 t:0 r:0 b:0" />
+                    <Property Name="HorzStepSize" Value="0.005" />
+                    <Property Name="VertStepSize" Value="0.005" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="HorzOverlapSize" Value="0.01" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.005,0},{0.01,0},{0.995,0},{0.99,0}}" />
+                    <Property Name="VertOverlapSize" Value="0.01" />
+                    <Property Name="HorzScrollPosition" Value="0" />
+                    <Property Name="VertScrollPosition" Value="0" />
+                </Window>
+            </Window>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerConfigMenu/CancelButton" >
+            <Property Name="Text" Value="Cancel" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.725,0},{0.4,0},{0.775,0}}" />
+            <Event Name="Clicked" Function="SingleplayerConfigMenu.SingleplayerConfigCancelButton_clicked"/>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerConfigMenu/OKButton" >
+            <Property Name="Text" Value="OK" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.6,0},{0.725,0},{0.75,0},{0.775,0}}" />
+            <Event Name="Clicked" Function="SingleplayerConfigMenu.SingleplayerConfigOKButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>
Index: code/branches/presentation2011/data/gui/layouts/SingleplayerMenu.layout
===================================================================
--- code/branches/presentation2011/data/gui/layouts/SingleplayerMenu.layout	(revision 8976)
+++ code/branches/presentation2011/data/gui/layouts/SingleplayerMenu.layout	(revision 8977)
@@ -15,14 +15,22 @@
             <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.7,0}}" />
-            <Window Type="MenuWidgets/Listbox" Name="orxonox/SingleplayerLevelListbox" >
+            <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.15,0},{0.8,0},{0.7,0}}" />
+            <Window Type="MenuWidgets/TabControl" Name="orxonox/SingleplayerTabControl" >
+                <Property Name="TabHeight" Value="{0,26.4388}" />
                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.85,0}}" />
+                <Property Name="TabPanePosition" Value="Top" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.1,0},{0.95,0},{0.925,0}}" />
             </Window>
-            <Window Type="MenuWidgets/Checkbox" Name="orxonox/SingleplayerShowAllCheckbox" >
-                <Property Name="Text" Value="show all" />
+            <Window Type="MenuWidgets/StaticImage" Name="orxonox/SingleplayerLevelImage" >
+                <Property Name="AlwaysOnTop" Value="True" />
                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-                <Property Name="UnifiedAreaRect" Value="{{0.65,0},{0.87,0},{0.8,0},{.97,0}}" />
-                <Event Name="CheckStateChanged" Function="SingleplayerMenu.SingleplayerShowAll_clicked"/>
+                <Property Name="UnifiedAreaRect" Value="{{0.55,0},{0.25,0},{0.9,0},{0.675,0}}" />
+            </Window>
+            <Window Type="MenuWidgets/StaticText" Name="orxonox/SingleplayerLevelDescription" >
+                <Property Name="AlwaysOnTop" Value="True" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="VertScrollbar" Value="True" />
+                <Property Name="HorzScrollbar" Value="True" />
+                <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.725,0},{0.9,0},{0.875,0}}" />
             </Window>
         </Window>
@@ -30,11 +38,18 @@
             <Property Name="Text" Value="Start" />
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.725,0},{0.4875,0},{0.775,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.725,0},{0.4,0},{0.775,0}}" />
             <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerStartButton_clicked"/>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerConfigButton" >
+            <Property Name="Text" Value="Configure" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.425,0},{0.725,0},{0.575,0},{0.775,0}}" />
+            <Property Name="Disabled" Value="True" />
+            <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerConfigButton_clicked"/>
         </Window>
         <Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerBackButton" >
             <Property Name="Text" Value="Back" />
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.725,0},{0.7125,0},{0.775,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.6,0},{0.725,0},{0.75,0},{0.775,0}}" />
             <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerBackButton_clicked"/>
         </Window>
Index: code/branches/presentation2011/data/gui/scripts/CreditsMenu.lua
===================================================================
--- code/branches/presentation2011/data/gui/scripts/CreditsMenu.lua	(revision 8976)
+++ code/branches/presentation2011/data/gui/scripts/CreditsMenu.lua	(revision 8977)
@@ -14,16 +14,7 @@
 function P.onShow()
     local description = winMgr:getWindow("orxonox/CreditsText")
-    description:setProperty("HorzFormatting", "WordWrapLeftAligned")
-    description:setProperty("VertFormatting", "TopAligned")
-    description:setText("                                   Orxonox version 0.0.3 \n \
-      Programming Language:  C++ - lua - tcl  \
-      Environment:  OpenAL - Ogre - OIS - CEGUI - enet - ODE  \
-      Licence:  GNU General Public Licence - Creative Commons \n  \
-      http://www.orxonox.net \n \
-      Credits:")
 
-    description:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
     height = getStaticTextWindowHeight(description)
-    description:setHeight(CEGUI.UDim(0, height))
+    description:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(0.0, height)))
 end
 
Index: code/branches/presentation2011/data/gui/scripts/InGameMenu.lua
===================================================================
--- code/branches/presentation2011/data/gui/scripts/InGameMenu.lua	(revision 8976)
+++ code/branches/presentation2011/data/gui/scripts/InGameMenu.lua	(revision 8977)
@@ -43,10 +43,9 @@
 -- events for ingamemenu
 function P.button_quit_clicked(e)
-    openDecisionPopup( "Do you really want to quit the game?", InGameMenu.callback )
+    openDecisionPopup( "Do you really want to quit the game?", InGameMenu.exitCallback )
 end
 
 function P.button_mainmenu_clicked(e)
-    orxonox.execute("startMainMenu")
-    hideMenuSheet("InGameMenu")
+    openDecisionPopup( "Do you really want to return to the main menu?", InGameMenu.mainMenuCallback )
 end
 
@@ -59,5 +58,14 @@
 end
 
-function P.callback(doExit)
+function P.mainMenuCallback(doExit)
+    if doExit then
+        orxonox.execute("startMainMenu")
+        hideMenuSheet("InGameMenu")
+    else
+        P.onShow()
+    end
+end
+
+function P.exitCallback(doExit)
     if doExit then
         hideMenuSheet("InGameMenu")
Index: code/branches/presentation2011/data/gui/scripts/MiscConfigMenu.lua
===================================================================
--- code/branches/presentation2011/data/gui/scripts/MiscConfigMenu.lua	(revision 8976)
+++ code/branches/presentation2011/data/gui/scripts/MiscConfigMenu.lua	(revision 8977)
@@ -11,5 +11,5 @@
 P.lineHeight = 0
 P.commandWidth = 0
-P.configWidth = 0
+P.editboxWidth = 0
 P.resetWidth = 0
 P.spaceWidth = 0
@@ -75,19 +75,24 @@
     end
 
-    P.sampleWindow:setText("configure")
-    size = getMinTextSize(P.sampleWindow)
-    P.configWidth = size[2]+20
-
     P.sampleWindow:setText("reset")
     size = getMinTextSize(P.sampleWindow)
     P.resetWidth = size[2]+20
 
-    P.spaceWidth = math.floor(1/8*P.configWidth)
+    P.spaceWidth = 10
+    
+    local pane = tolua.cast(winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane"), "CEGUI::ScrollablePane")
+    size = pane:getViewableArea()
+    P.editboxWidth = size:getWidth() - P.commandWidth - P.resetWidth - 5*P.spaceWidth
 
     P.createLines()
 
     P:setButton(1, 1, {
-            ["button"] = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigBackButton"),
-            ["callback"]  = P.MiscConfigBackButton_clicked
+            ["button"] = winMgr:getWindow("orxonox/MiscConfigMenu/CancelButton"),
+            ["callback"]  = P.MiscConfigCancelButton_clicked
+    })
+    
+    P:setButton(1, 2, {
+            ["button"] = winMgr:getWindow("orxonox/MiscConfigMenu/OKButton"),
+            ["callback"]  = P.MiscConfigOKButton_clicked
     })
 end
@@ -95,8 +100,10 @@
 function P.createLine(k)
     local offset = 0
+    -- content window for the entire line
     local line = winMgr:createWindow("DefaultWindow", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k)
     line:setHeight(CEGUI.UDim(0, P.lineHeight))
     line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, P.lineHeight*(k-1))))
 
+    -- config name
     local command = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Command")
     command:setText(P.nameList[k])
@@ -106,29 +113,22 @@
     offset = offset + P.commandWidth + P.spaceWidth
 
+    -- config value (editable)
     local configvalue = winMgr:createWindow("MenuWidgets/Editbox", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Configvalue")
     configvalue:setProperty("ReadOnly", "set:False")
     local value = orxonox.CommandExecutor:query("getConfig " .. P.commandList[k])
     configvalue:setText(value)
-    P.sampleWindow:setText(value)
-    local size = getMinTextSize(P.sampleWindow)
-    local configvalueWidth = 2*size[2]
-    configvalue:setSize(CEGUI.UVector2(CEGUI.UDim(0, configvalueWidth), CEGUI.UDim(0.9, 0)))
+    configvalue:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.editboxWidth), CEGUI.UDim(0.9, 0)))
     configvalue:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0)))
+    -- enable the reset button if the value changed
+    orxonox.GUIManager:subscribeEventHelper(configvalue, "TextAccepted", P.name .. ".MiscConfigEditbox_textAccepted")
     line:addChildWindow(configvalue)
-    offset = offset + configvalueWidth + P.spaceWidth
+    offset = offset + P.editboxWidth + P.spaceWidth
 
-    local config = winMgr:createWindow("MenuWidgets/Button", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Config")
-    config:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.configWidth), CEGUI.UDim(0.9, 0)))
-    config:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0)))
-    config:setText("configure")
-    orxonox.GUIManager:subscribeEventHelper(config, "Clicked", P.name .. ".MiscConfigConfigure_clicked")
-    line:addChildWindow(config)
-    offset = offset + P.configWidth + P.spaceWidth
-
+    -- reset button (only available when value changed)
     local reset = winMgr:createWindow("MenuWidgets/Button", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Reset")
     reset:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.resetWidth), CEGUI.UDim(0.9, 0)))
     reset:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0)))
     reset:setText("reset")
-    orxonox.GUIManager:subscribeEventHelper(reset, "Clicked", P.name .. ".MiscConfigReset_clicked")
+    orxonox.GUIManager:subscribeEventHelper(reset, "Clicked", P.name .. ".MiscConfigResetButton_clicked")
     line:addChildWindow(reset)
     reset:setEnabled(false)
@@ -153,5 +153,21 @@
 end
 
-function P.MiscConfigReset_clicked(e)
+function P.MiscConfigOKButton_clicked(e)
+    for k,v in pairs(P.commandList) do
+        -- save the changes
+        local editbox = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Configvalue")
+        orxonox.CommandExecutor:execute("config " .. P.commandList[k] .. " " .. editbox:getText())
+        local resetButton = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Reset")
+        resetButton:setEnabled(false)
+    end
+    
+    hideMenuSheet("MiscConfigMenu")
+end
+
+function P.MiscConfigCancelButton_clicked(e)
+    hideMenuSheet("MiscConfigMenu")
+end
+
+function P.MiscConfigEditbox_textAccepted(e)
     local we = CEGUI.toWindowEventArgs(e)
     local name = we.window:getName()
@@ -160,8 +176,9 @@
     local commandNr = tonumber(match())
 
-    -- TODO: Implement reset.
+    local resetButton = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Reset")
+    resetButton:setEnabled(true)
 end
 
-function P.MiscConfigConfigure_clicked(e)
+function P.MiscConfigResetButton_clicked(e)
     local we = CEGUI.toWindowEventArgs(e)
     local name = we.window:getName()
@@ -170,13 +187,10 @@
     local commandNr = tonumber(match())
 
-    local window = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Configvalue")
-
-    orxonox.CommandExecutor:execute("config " .. P.commandList[commandNr] .. " " .. window:getText())
+    -- reload the old value
+    local editbox = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Configvalue")
     local value = orxonox.CommandExecutor:query("getConfig " .. P.commandList[commandNr])
-    window:setText(value)
-end
-
-function P.MiscConfigBackButton_clicked(e)
-    hideMenuSheet("MiscConfigMenu")
+    editbox:setText(value)
+    
+    we.window:setEnabled(false)
 end
 
Index: code/branches/presentation2011/data/gui/scripts/SingleplayerConfigMenu.lua
===================================================================
--- code/branches/presentation2011/data/gui/scripts/SingleplayerConfigMenu.lua	(revision 8977)
+++ code/branches/presentation2011/data/gui/scripts/SingleplayerConfigMenu.lua	(revision 8977)
@@ -0,0 +1,198 @@
+-- SingleplayerMenu.lua
+
+local P = createMenuSheet("SingleplayerConfigMenu")
+
+P.commandList = {}
+P.nameList = {}
+P.linesList = {}
+
+P.sampleWindow = nil
+
+P.lineHeight = 0
+P.commandWidth = 0
+P.editboxWidth = 0
+P.resetWidth = 0
+P.spaceWidth = 0
+
+function P.onLoad()
+    P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/SingleplayerConfigMenu/MiscConfigPane/SampleWindow")
+    P.sampleWindow:setText("SampleText")
+
+    P:setButton(1, 1, {
+            ["button"] = winMgr:getWindow("orxonox/SingleplayerConfigMenu/CancelButton"),
+            ["callback"]  = P.SingleplayerConfigCancelButton_clicked
+    })
+    
+    P:setButton(1, 2, {
+            ["button"] = winMgr:getWindow("orxonox/SingleplayerConfigMenu/OKButton"),
+            ["callback"]  = P.SingleplayerConfigOKButton_clicked
+    })
+end
+
+function P.loadConfig(level)
+    P.commandList = {}
+    table.insert(P.commandList, "Gametype initialStartCountdown_")
+    table.insert(P.commandList, "Gametype bAutoStart_")
+    table.insert(P.commandList, "Gametype numberOfBots_")
+    table.insert(P.commandList, "Dynamicmatch gameTime_")
+    table.insert(P.commandList, "Dynamicmatch friendlyfire")
+    table.insert(P.commandList, "Dynamicmatch tutorial")
+    table.insert(P.commandList, "LastManStanding lives")
+    table.insert(P.commandList, "LastManStanding respawnDelay")
+    table.insert(P.commandList, "LastManStanding bNoPunishment")
+    table.insert(P.commandList, "LastManStanding bHardPunishment")
+    table.insert(P.commandList, "LastTeamStanding lives")
+    table.insert(P.commandList, "LastTeamStanding respawnDelay")
+    table.insert(P.commandList, "LastTeamStanding bNoPunishment")
+    table.insert(P.commandList, "LastTeamStanding bHardPunishment")
+    table.insert(P.commandList, "TeamDeathmatch teams_")
+    table.insert(P.commandList, "UnderAttack gameTime_")
+
+    P.nameList = {}
+    table.insert(P.nameList, "Start countdown")
+    table.insert(P.nameList, "Autostart")
+    table.insert(P.nameList, "Number of Bots")
+    table.insert(P.nameList, "Dynamicmatch: game time")
+    table.insert(P.nameList, "Dynamicmatch: friendly fire")
+    table.insert(P.nameList, "Dynamicmatch: tutorial")
+    table.insert(P.nameList, "LastManStanding: lives")
+    table.insert(P.nameList, "LastManStanding: respawn delay")
+    table.insert(P.nameList, "LastManStanding: no punishment")
+    table.insert(P.nameList, "LastManStanding: hard punishment")
+    table.insert(P.nameList, "LastTeamStanding: lives")
+    table.insert(P.nameList, "LastTeamStanding: respawn delay")
+    table.insert(P.nameList, "LastTeamStanding: no punishment")
+    table.insert(P.nameList, "LastTeamStanding: hard punishment")
+    table.insert(P.nameList, "TeamDeathmatch: Number of teams")
+    table.insert(P.nameList, "UnderAttack: game time")
+
+    P.linesList = {}
+    
+    --Calculate design parameters:
+    local size = getMinTextSize(P.sampleWindow)
+    P.lineHeight = size[1]
+
+    P.commandWidth = 0
+    for k,v in pairs(P.commandList) do
+        P.sampleWindow:setText(P.nameList[k])
+        size = getMinTextSize(P.sampleWindow)
+        if size[2] > P.commandWidth then
+            P.commandWidth = 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/SingleplayerConfigMenu/MiscConfigPane"), "CEGUI::ScrollablePane")
+    size = pane:getViewableArea()
+    P.editboxWidth = size:getWidth() - P.commandWidth - P.resetWidth - 5*P.spaceWidth
+
+    P.createLines()
+end
+
+function P.createLine(k)
+    local offset = 0
+    -- destroy config line, if it already exists (otherwise would cause an error)
+    if winMgr:isWindowPresent("orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k) then
+        winMgr:destroyWindow("orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k)
+    end
+    -- content window for the entire line
+    local line = winMgr:createWindow("DefaultWindow", "orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k)
+    line:setHeight(CEGUI.UDim(0, P.lineHeight))
+    line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, P.lineHeight*(k-1))))
+
+    -- config name
+    local command = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Command")
+    command:setText(P.nameList[k])
+    command:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.commandWidth), CEGUI.UDim(1, 0)))
+    command:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0, 0)))
+    line:addChildWindow(command)
+    offset = offset + P.commandWidth + P.spaceWidth
+
+    -- config value (editable)
+    local configvalue = winMgr:createWindow("MenuWidgets/Editbox", "orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Configvalue")
+    configvalue:setProperty("ReadOnly", "set:False")
+    local value = orxonox.CommandExecutor:query("getConfig " .. P.commandList[k])
+    configvalue:setText(value)
+    configvalue:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.editboxWidth), CEGUI.UDim(0.9, 0)))
+    configvalue:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0)))
+    -- enable the reset button if the value changed
+    orxonox.GUIManager:subscribeEventHelper(configvalue, "TextAccepted", P.name .. ".SingleplayerConfigEditbox_textAccepted")
+    line:addChildWindow(configvalue)
+    offset = offset + P.editboxWidth + P.spaceWidth
+
+    -- reset button (only available when value changed)
+    local reset = winMgr:createWindow("MenuWidgets/Button", "orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Reset")
+    reset:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.resetWidth), CEGUI.UDim(0.9, 0)))
+    reset:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0)))
+    reset:setText("reset")
+    orxonox.GUIManager:subscribeEventHelper(reset, "Clicked", P.name .. ".SingleplayerConfigResetButton_clicked")
+    line:addChildWindow(reset)
+    reset:setEnabled(false)
+    offset = offset + P.resetWidth + P.spaceWidth
+
+    line:setWidth(CEGUI.UDim(0, offset))
+
+    return line
+end
+
+function P.createLines()
+    local window = winMgr:getWindow("orxonox/SingleplayerConfigMenu/MiscConfigPane")
+
+    for k,v in pairs(P.commandList) do
+        local line = P.createLine(k)
+        table.insert(P.linesList, line)
+        window:addChildWindow(line)
+    end
+
+    local pane = tolua.cast(window, "CEGUI::ScrollablePane")
+    pane:setVerticalStepSize(getScrollingStepSize(window))
+end
+
+function P.SingleplayerConfigOKButton_clicked(e)
+    for k,v in pairs(P.commandList) do
+        -- save the changes
+        local editbox = winMgr:getWindow("orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Configvalue")
+        orxonox.CommandExecutor:execute("config " .. P.commandList[k] .. " " .. editbox:getText())
+        local resetButton = winMgr:getWindow("orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Reset")
+        resetButton:setEnabled(false)
+    end
+    
+    hideMenuSheet("SingleplayerConfigMenu")
+end
+
+function P.SingleplayerConfigCancelButton_clicked(e)
+    hideMenuSheet("SingleplayerConfigMenu")
+end
+
+function P.SingleplayerConfigEditbox_textAccepted(e)
+    local we = CEGUI.toWindowEventArgs(e)
+    local name = we.window:getName()
+
+    local match = string.gmatch(name, "%d+")
+    local commandNr = tonumber(match())
+
+    local resetButton = winMgr:getWindow("orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Reset")
+    resetButton:setEnabled(true)
+end
+
+function P.SingleplayerConfigResetButton_clicked(e)
+    local we = CEGUI.toWindowEventArgs(e)
+    local name = we.window:getName()
+
+    local match = string.gmatch(name, "%d+")
+    local commandNr = tonumber(match())
+
+    -- reload the old value
+    local editbox = winMgr:getWindow("orxonox/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Configvalue")
+    local value = orxonox.CommandExecutor:query("getConfig " .. P.commandList[commandNr])
+    editbox:setText(value)
+    
+    we.window:setEnabled(false)
+end
+
+return P
Index: code/branches/presentation2011/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- code/branches/presentation2011/data/gui/scripts/SingleplayerMenu.lua	(revision 8976)
+++ code/branches/presentation2011/data/gui/scripts/SingleplayerMenu.lua	(revision 8977)
@@ -4,14 +4,23 @@
 
 P.levelList = {}
-P.itemList = {}
-P.showAll = false
+P.activeTabIndexes = {}
+P.scrollbarWidth = 13
 
 function P.onLoad()
-    local window = winMgr:getWindow("orxonox/SingleplayerShowAllCheckbox")
-    local button = tolua.cast(window,"CEGUI::Checkbox")
-    button:setSelected(false)
     P.createLevelList()
-
-    --buttons are arranged in a 1x2 matrix
+    
+    -- create tabs with desired tab as argument (nil for all)
+    P.createFilterTab("Gametypes", "gametype")
+    P.createFilterTab("Missions", "mission")
+    P.createFilterTab("Minigames", "minigame")
+    P.createFilterTab("Showcases", "showcase")
+    P.createFilterTab("Presentations", "presentation")
+    P.createFilterTab("Tests", "test")
+    P.createFilterTab("Show All", nil)
+    
+    -- update description and screenshot boxes
+    P.SingleplayerSelectionChanged()
+    
+    --buttons are arranged in a 1x3 matrix
     P:setButton(1, 1, {
             ["button"] = winMgr:getWindow("orxonox/SingleplayerStartButton"),
@@ -20,4 +29,9 @@
 
     P:setButton(1, 2, {
+            ["button"] = winMgr:getWindow("orxonox/SingleplayerConfigButton"),
+            ["callback"]  = P.SingleplayerConfigButton_clicked
+    })
+
+    P:setButton(1, 3, {
             ["button"] = winMgr:getWindow("orxonox/SingleplayerBackButton"),
             ["callback"]  = P.SingleplayerBackButton_clicked
@@ -25,21 +39,6 @@
 end
 
-function P.onShow()
-    if P.showAll ~= orxonox.GUIManager:inDevMode() then
-        local window = winMgr:getWindow("orxonox/SingleplayerShowAllCheckbox")
-        local button = tolua.cast(window,"CEGUI::Checkbox")
-        P.showAll = not P.showAll
-        button:setSelected(P.showAll)
-        P.createLevelList()
-    end
-end
-
 function P.createLevelList()
     P.levelList = {}
-    P.itemList = {}
-    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/SingleplayerLevelListbox"))
-    listbox:resetList()
-    orxonox.GUIManager:setItemTooltipsEnabledHelper(listbox, true)
-    local preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
     local size = orxonox.LevelManager:getInstance():getNumberOfLevels()
     local index = 0
@@ -48,43 +47,111 @@
         level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
         if level ~= nil then
-            if P.showAll or not level:hasTag("test") then
-                table.insert(P.levelList, level)
+            local levelXMLFilename = level:getXMLFilename()
+            -- create an imageset for each screenshot
+            local imageName = level:getScreenshot()
+            if imageName ~= "" then
+                CEGUI.ImagesetManager:getSingleton():createImagesetFromImageFile(levelXMLFilename..imageName, imageName)
+            else
+                CEGUI.ImagesetManager:getSingleton():createImagesetFromImageFile(levelXMLFilename..imageName, "noscreenshot.png")
             end
+            table.insert(P.levelList, level)
         end
         index = index + 1
     end
+end
 
+function P.createFilterTab(name, tag)
+    -- create unique tab window name
+    local tabName = "orxonox/SingleplayerLevelTab"
+    if tag ~= nil then
+        tabName = tabName..tag
+    end
+    -- create new tab window with desired name
+    local listbox = CEGUI.toListbox(winMgr:createWindow("MenuWidgets/Listbox", tabName))
+    listbox:setText(name)
+    listbox:setProperty("UnifiedMaxSize", "{{1,0},{1,0}}")
+    listbox:setProperty("UnifiedAreaRect", "{{0.05,0},{0.1,0},{0.5,0},{0.675,0}}")
+    -- fill listbox with items
+    listbox:resetList()
+    orxonox.GUIManager:setItemTooltipsEnabledHelper(listbox, true)
+    local preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
+    local tabIndexes = {}
     for k,v in pairs(P.levelList) do
-        local item = CEGUI.createListboxTextItem(v:getName())
-        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
-        listbox:addItem(item)
-        if v:getXMLFilename() == preselect then
-            listbox:setItemSelectState(item, true)
+        -- only add level if it has desired tag
+        if tag == nil or v:hasTag(tag) then
+            local item = CEGUI.createListboxTextItem(v:getName())
+            item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+            listbox:addItem(item)
+            table.insert(tabIndexes, k)
+            if v:getXMLFilename() == preselect then
+                listbox:setItemSelectState(item, true)
+            end
+            orxonox.GUIManager:setTooltipTextHelper(item, v:getDescription())
         end
-        P.itemList[k] = listbox:getListboxItemFromIndex(k-1)
-        orxonox.GUIManager:setTooltipTextHelper(P.itemList[k], v:getDescription())
+    end
+    table.insert(P.activeTabIndexes, tabIndexes)
+    -- listen to selection changes
+    orxonox.GUIManager:subscribeEventHelper(listbox, "ItemSelectionChanged", P.name..".SingleplayerSelectionChanged")
+    local tabControl = winMgr:getWindow("orxonox/SingleplayerTabControl")
+    orxonox.GUIManager:subscribeEventHelper(tabControl, "TabSelectionChanged", P.name..".SingleplayerSelectionChanged")
+    if listbox:getItemCount() > 0 then
+        tabControl:addChildWindow(tabName)
+    end
+end
+
+function P.SingleplayerGetSelectedLevel()
+    -- choose the active listbox
+    local tabControl = CEGUI.toTabControl(winMgr:getWindow("orxonox/SingleplayerTabControl"))
+    local listbox = CEGUI.toListbox(tabControl:getTabContentsAtIndex(tabControl:getSelectedTabIndex()))
+    local choice = listbox:getFirstSelectedItem()
+    if choice ~= nil then
+        -- get the right tab and the right index
+        local tabIndexes = P.activeTabIndexes[tabControl:getSelectedTabIndex()+1]
+        local index = tabIndexes[listbox:getItemIndex(choice)+1]
+        return P.levelList[index]
+    else
+        return nil
+    end
+end
+
+function P.SingleplayerSelectionChanged(e)
+    local levelImage = winMgr:getWindow("orxonox/SingleplayerLevelImage")
+    local levelDescription = winMgr:getWindow("orxonox/SingleplayerLevelDescription")
+    local configButton = winMgr:getWindow("orxonox/SingleplayerConfigButton")
+    local level = P.SingleplayerGetSelectedLevel()
+    if level ~= nil then
+        local levelXMLFilename = level:getXMLFilename()
+        local imageName = level:getScreenshot()
+        -- set the screenshot and the description for the selected level
+        levelImage:setProperty("Image", "set:"..levelXMLFilename..imageName.." image:full_image")
+        levelDescription:setText(level:getDescription())
+        -- only enable config button for "gametype" levels
+        if level:hasTag("gametype") then
+            configButton:setProperty("Disabled", "False")
+        else
+            configButton:setProperty("Disabled", "True")
+        end
+    else
+        -- also take care of "no level selected"
+        levelImage:setProperty("Image", nil)
+        levelDescription:setText("")
+        configButton:setProperty("Disabled", "True")
     end
 end
 
 function P.SingleplayerStartButton_clicked(e)
-    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.execute("startGame " .. level:getXMLFilename())
-            hideAllMenuSheets()
-        end
+    local level = P.SingleplayerGetSelectedLevel()
+    if level ~= nil then
+        orxonox.execute("startGame " .. level:getXMLFilename())
+        hideAllMenuSheets()
     end
 end
 
-function P.SingleplayerShowAll_clicked(e)
-    local checkbox = tolua.cast(winMgr:getWindow("orxonox/SingleplayerShowAllCheckbox"), "CEGUI::Checkbox")
-    local show = checkbox:isSelected()
-    if show ~= P.showAll then
-        P.showAll = show
-        P.createLevelList()
-   end
+function P.SingleplayerConfigButton_clicked(e)
+    local level = P.SingleplayerGetSelectedLevel()
+    if level ~= nil then
+        local configMenu = showMenuSheet("SingleplayerConfigMenu")
+        configMenu:loadConfig(level)
+    end
 end
 
@@ -94,3 +161,2 @@
 
 return P
-
Index: code/branches/presentation2011/data/levels/FPSTest.oxw
===================================================================
--- code/branches/presentation2011/data/levels/FPSTest.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/FPSTest.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "Level to test First Person Shooter"
  tags = "test"
+ screenshot = "fpstestlevel.png"
 />
 
@@ -14,8 +15,5 @@
 ?>
 
-<Level
- name         = "fps"
- description  = "tests"
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/asteroids.oxw
===================================================================
--- code/branches/presentation2011/data/levels/asteroids.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/asteroids.oxw	(revision 8977)
@@ -1,2 +1,9 @@
+<LevelInfo
+ name = "Asteroids Race"
+ description = "Reach the checkpoints and avoid asteroids."
+ tags = "gametype"
+ screenshot = "asteroids.png"
+/>
+
 <?lua
   include("HUDTemplates3.oxo")
@@ -7,7 +14,5 @@
 
 <Level
- name         = "Asteroids Race"
- description  = "testmap for gametype asteroid race"
- gametype     =  Asteroids
+ gametype = "Asteroids"
 >
   <templates>
Index: code/branches/presentation2011/data/levels/docking.oxw
===================================================================
--- code/branches/presentation2011/data/levels/docking.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/docking.oxw	(revision 8977)
@@ -2,5 +2,6 @@
  name = "Transporter"
  description = "Level with a Transporter. Demonstrates the docking system."
- tags = ""
+ tags = "showcase"
+ screenshot = "transporter.png"
 />
 
@@ -12,8 +13,5 @@
 ?>
 
-<Level
- name         = "Transporter"
- description  = "Docking example level"
->
+<Level>
   <templates>
     <Template link="lodtemplate_default" />
Index: code/branches/presentation2011/data/levels/dynamicMatch.oxw
===================================================================
--- code/branches/presentation2011/data/levels/dynamicMatch.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/dynamicMatch.oxw	(revision 8977)
@@ -1,2 +1,9 @@
+<LevelInfo
+ name = "Dynamic Match"
+ description = "Dynamicmatch: Take care of what you're shooting at."
+ tags = "gametype"
+ screenshot = "dynamicMatch.png"
+/>
+
 <?lua
   include("HUDTemplates3.oxo")
@@ -9,7 +16,5 @@
 
 <Level
- name         = "Dynamic Match"
- description  = "In progress -level for dynamicmatch"
- gametype     = "Dynamicmatch"
+ gametype = "Dynamicmatch"
 >
   <templates>
Index: code/branches/presentation2011/data/levels/earth.oxw
===================================================================
--- code/branches/presentation2011/data/levels/earth.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/earth.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "1:100 Scale Model of Earth with Gravity"
  tags = "showcase"
+ screenshot = "earthdemonstration.png"
 />
 
@@ -12,8 +13,5 @@
 ?>
 
-<Level
- name         = "Planet Earth"
- description  = "1:100 Scale Model of Earth with Gravity"
->
+<Level>
   <templates>
     <Template link="lodtemplate_default" />
Index: code/branches/presentation2011/data/levels/emptyLevel.oxw
===================================================================
--- code/branches/presentation2011/data/levels/emptyLevel.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/emptyLevel.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "A level with absolutely nothing in it."
  tags = "test"
+ screenshot = "emptylevel.png"
 />
 
@@ -16,8 +17,5 @@
 ?>
 
-<Level
- name         = "Sample"
- description  = "Just a few tests"
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/events.oxw
===================================================================
--- code/branches/presentation2011/data/levels/events.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/events.oxw	(revision 8977)
@@ -2,5 +2,6 @@
   name = "Events showcase"
   description = "Level to test and showcase events."
-  tags = "test, showcase" 
+  tags = "test, showcase"
+  screenshot = "eventsshowcase.png"
 />
 
@@ -13,8 +14,5 @@
 ?>
 
-<Level
- name         = "Event testing"
- description  = "A simple level to test the event-system (with comments)"
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/lastManStanding.oxw
===================================================================
--- code/branches/presentation2011/data/levels/lastManStanding.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/lastManStanding.oxw	(revision 8977)
@@ -2,5 +2,6 @@
  name = "Last Man Standing"
  description = "Be the sole survivor."
- tags = ""
+ tags = "gametype"
+ screenshot = "lastmanstanding.png"
 />
 
@@ -16,7 +17,5 @@
 
 <Level
- name         = "Last Man Standing"
- description  = "testmap for gametype last man standing"
- gametype     =  "LastManStanding"
+ gametype = "LastManStanding"
 >
   <templates>
Index: code/branches/presentation2011/data/levels/lastTeamStanding.oxw
===================================================================
--- code/branches/presentation2011/data/levels/lastTeamStanding.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/lastTeamStanding.oxw	(revision 8977)
@@ -2,5 +2,6 @@
  name = "Last Team Standing"
  description = "Survive as a team."
- tags = "singleplayer"
+ tags = "gametype"
+ screenshot = "lastteamstanding.png"
 />
 <?lua
@@ -15,7 +16,5 @@
 
 <Level
- name         = "Last Team Standing"
- description  = "testmap for gametype last team standing"
- gametype     =  "LastTeamStanding"
+ gametype = "LastTeamStanding"
 >
   <templates>
Index: code/branches/presentation2011/data/levels/myTestLevel.oxw
===================================================================
--- code/branches/presentation2011/data/levels/myTestLevel.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/myTestLevel.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "A level to test the Class SpaceBoundaries."
  tags = "test"
+ screenshot = "mytestlevel.png"
 />
 
@@ -16,8 +17,5 @@
 ?>
 
-<Level
- name         = "Sample"
- description  = "Just a few tests"
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/notifications.oxw
===================================================================
--- code/branches/presentation2011/data/levels/notifications.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/notifications.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "Level to test and showcase notifications."
  tags = "test, showcase"
+ screenshot = "notificationsshowcase.png"
 />
 
@@ -12,8 +13,5 @@
 ?>
 
-<Level
- name         = "Presentation"
- description  = "A simple testlevel"
->
+<Level>
     <templates>
         <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/pickups.oxw
===================================================================
--- code/branches/presentation2011/data/levels/pickups.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/pickups.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "Level to test and showcase pickups."
  tags = "test, showcase"
+ screenshot = "pickupsshowcase.png"
 />
 
@@ -16,8 +17,5 @@
 ?>
 
-<Level
- name         = "Sample"
- description  = "Just a few tests"
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/pirateAttack.oxw
===================================================================
--- code/branches/presentation2011/data/levels/pirateAttack.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/pirateAttack.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "Dani's Testlevel"
  tags = "test"
+ screenshot = "pirateattack.png"
 />
 
@@ -26,7 +27,5 @@
     
 <Level
-name="Dani's Testlevel"
-description="Erste Versuche mit den Quests"
-gametype=TeamDeathmatch
+ gametype = "TeamDeathmatch"
 >
 
Index: code/branches/presentation2011/data/levels/planets.oxw
===================================================================
--- code/branches/presentation2011/data/levels/planets.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/planets.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "Demonstration of Planets"
  tags = "showcase"
+ screenshot = "planetdemonstration.png"
 />
 
@@ -12,8 +13,5 @@
 ?>
 
-<Level
- name         = "Planet"
- description  = "Demonstration of Planets"
->
+<Level>
   <templates>
     <Template link="lodtemplate_default" />
Index: code/branches/presentation2011/data/levels/pong.oxw
===================================================================
--- code/branches/presentation2011/data/levels/pong.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/pong.oxw	(revision 8977)
@@ -2,5 +2,6 @@
  name = "Pong"
  description = "Pong in space!"
- tags = ""
+ tags = "minigame"
+ screenshot = "pong.png"
 />
 
@@ -49,7 +50,5 @@
 
 <Level
- name         = "Presentation"
- description  = "A simple testlevel"
- gametype     = Pong
+ gametype = "Pong"
 >
   <templates>
Index: code/branches/presentation2011/data/levels/portals.oxw
===================================================================
--- code/branches/presentation2011/data/levels/portals.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/portals.oxw	(revision 8977)
@@ -3,5 +3,6 @@
  name = "Portals"
  description = "Level for testing portals"
- tags = "tutorial"
+ tags = "test"
+ screenshot = "portals.png"
 />
 
@@ -14,8 +15,5 @@
 ?>
 
-<Level
- name         = "Presentation"
- description  = "A simple testlevel"
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/presentation.oxw
===================================================================
--- code/branches/presentation2011/data/levels/presentation.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/presentation.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "Presentation Level"
  tags = "presentation"
+ screenshot = "presentation.png"
 />
 
@@ -12,8 +13,5 @@
 ?>
 
-<Level
- name         = "Sample"
- description  = "Just a few tests"
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/presentation09.oxw
===================================================================
--- code/branches/presentation2011/data/levels/presentation09.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/presentation09.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "3rd Presentation level for Orxonox Convention X"
  tags = "presentation"
+ screenshot = "presentationx3rd.png"
 />
 
@@ -13,9 +14,5 @@
 ?>
 
-<Level
- name         = "Presentation09"
- description  = "presentation level for Orxonox Convention X"
-
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/presentation09b.oxw
===================================================================
--- code/branches/presentation2011/data/levels/presentation09b.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/presentation09b.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "2nd Presentation level for Orxonox Convention X"
  tags = "presentation"
+ screenshot = "presentationx2.png"
 />
 
@@ -16,7 +17,5 @@
 
 <Level
- name         = "Presentation09"
- description  = "presentation level for Orxonox Convention X"
- gametype     = TeamDeathmatch
+ gametype = "TeamDeathmatch"
 >
   <templates>
Index: code/branches/presentation2011/data/levels/presentationDM.oxw
===================================================================
--- code/branches/presentation2011/data/levels/presentationDM.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/presentationDM.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "Presentation Level"
  tags = "presentation"
+ screenshot = "presentationdm.png"
 />
 
@@ -14,7 +15,5 @@
 
 <Level
- name         = "Presentation"
- description  = "A simple testlevel"
- gametype     = Deathmatch
+ gametype = "Deathmatch"
 >
   <templates>
Index: code/branches/presentation2011/data/levels/presentationFS10.oxw
===================================================================
--- code/branches/presentation2011/data/levels/presentationFS10.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/presentationFS10.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "1st Presentation level for Orxonox Convention XI"
  tags = "presentation"
+ screenshot = "presentationxi.png"
 />
 
@@ -19,7 +20,5 @@
 
 <Level
- name         = "Sample"
- description  = "Just a few tests"
- gametype     = TeamDeathmatch
+ gametype = "TeamDeathmatch"
 >
   <templates>
Index: code/branches/presentation2011/data/levels/presentationFS102.oxw
===================================================================
--- code/branches/presentation2011/data/levels/presentationFS102.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/presentationFS102.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "2nd Presentation level for Orxonox Convention XI, FPS"
  tags = "presentation"
+ screenshot = "presentationxifps1st.png"
 />
 
@@ -14,8 +15,5 @@
 ?>
 
-<Level
- name         = "fps"
- description  = "tests"
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/presentationFS10Ed.oxw
===================================================================
--- code/branches/presentation2011/data/levels/presentationFS10Ed.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/presentationFS10Ed.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "3rd Presentation level for Orxonox Convention XI, FPS"
  tags = "presentation"
+ screenshot = "presentationxifps2nd.png"
 />
 
@@ -14,8 +15,5 @@
 ?>
 
-<Level
- name         = "fps"
- description  = "tests"
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/presentationFS11.oxw
===================================================================
--- code/branches/presentation2011/data/levels/presentationFS11.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/presentationFS11.oxw	(revision 8977)
@@ -2,5 +2,6 @@
  name = "Presentation FS11"
  description = "Presentation level spring semester '11"
- tags = "test"
+ tags = "presentation"
+ screenshot = "presentationfs11.png"
 />
 
@@ -21,8 +22,5 @@
 ?>
 
-<Level
- name         = "Sample"
- description  = "Just a few tests"
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/presentationHS09.oxw
===================================================================
--- code/branches/presentation2011/data/levels/presentationHS09.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/presentationHS09.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "1st Presentation level for Orxonox Convention X"
  tags = "presentation"
+ screenshot = "presentationx1st.png"
 />
 
@@ -16,7 +17,5 @@
 
 <Level
- name         = "Presentation09"
- description  = "presentation level for Orxonox Convention X"
- gametype     = TeamDeathmatch
+ gametype = "TeamDeathmatch"
  hasPhysics = true
 >
Index: code/branches/presentation2011/data/levels/presentationHS09b.oxw
===================================================================
--- code/branches/presentation2011/data/levels/presentationHS09b.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/presentationHS09b.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "2nd Presentation level for Orxonox Convention X"
  tags = "presentation"
+ screenshot = "presentationx2nd.png"
 />
 
@@ -22,7 +23,5 @@
 
 <Level
- name         = "Sample"
- description  = "Just a few tests"
- gametype     = TeamDeathmatch
+ gametype = "TeamDeathmatch"
 >
   <templates>
Index: code/branches/presentation2011/data/levels/princessAeryn.oxw
===================================================================
--- code/branches/presentation2011/data/levels/princessAeryn.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/princessAeryn.oxw	(revision 8977)
@@ -2,5 +2,6 @@
  name = "The Tale of Princess Aeryn"
  description = "The Tale of the elusive but beautiful Princess Aeryn"
- tags = ""
+ tags = "mission"
+ screenshot = "thetaleofprincessaeryn.png"
 />
 
@@ -16,8 +17,5 @@
 ?>
 
-<Level
- name     = "The Tale of Princess Aeryn"
- description  = "The Tale of Princess Aeryn"
->
+<Level>
 
   <templates>
Index: code/branches/presentation2011/data/levels/quests.oxw
===================================================================
--- code/branches/presentation2011/data/levels/quests.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/quests.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "Level to test and showcase quests."
  tags = "test, showcase"
+ screenshot = "questsshowcase.png"
 />
 
@@ -12,8 +13,5 @@
 ?>
 
-<Level
- name         = "Questsystem"
- description  = "Just a few tests"
->
+<Level>
     <templates>
         <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/screenshot.oxw
===================================================================
--- code/branches/presentation2011/data/levels/screenshot.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/screenshot.oxw	(revision 8977)
@@ -2,5 +2,6 @@
  name = "Screenshot"
  description = "Level to make awesome screenshots in."
- tags = "test"
+ tags = "test, showcase"
+ screenshot = "screenshot.png"
 />
 
@@ -15,7 +16,5 @@
 
 <Level
- name         = "Waypoints"
- description  = "Testing waypoings for AI controlled spaceships."
- gametype     = TeamDeathmatch
+ gametype = "TeamDeathmatch"
 >
   <templates>
Index: code/branches/presentation2011/data/levels/shieldTest.oxw
===================================================================
--- code/branches/presentation2011/data/levels/shieldTest.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/shieldTest.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "A simple Level with one shielded drone to shoot at"
  tags = "test"
+ screenshot = "shieldtestlevel.png"
 />
 
@@ -12,8 +13,5 @@
 ?>
 
-<Level
- name         = "shieldTL"
- description  = "LEVEL-DESCRIPTION"
->
+<Level>
 
 <templates>
Index: code/branches/presentation2011/data/levels/sound.oxw
===================================================================
--- code/branches/presentation2011/data/levels/sound.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/sound.oxw	(revision 8977)
@@ -2,5 +2,6 @@
  name = "Sound showcase"
  description = "Level to test and showcase sound."
- tags = "test"
+ tags = "test, showcase"
+ screenshot = "soundshowcase.png"
 />
 
@@ -16,8 +17,5 @@
 ?>
 
-<Level
- name         = "Sample"
- description  = "Just a few tests"
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/spaceRace.oxw
===================================================================
--- code/branches/presentation2011/data/levels/spaceRace.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/spaceRace.oxw	(revision 8977)
@@ -1,6 +1,7 @@
 <LevelInfo
  name = "Space Race"
- description = "Test level for the gametype Space Race."
- tags = "test"
+ description = "Have a furious Race in Space: Reach the checkpoints as fast as possible."
+ tags = "gametype"
+ screenshot = "spacerace.png"
 />
 
@@ -17,7 +18,5 @@
 
 <Level
- name         = "Space Race"
- description  = "Test level for the gametype Space Race."
- gametype     = SpaceRace
+ gametype = "SpaceRace"
 >
   <templates>
Index: code/branches/presentation2011/data/levels/teamBaseMatch.oxw
===================================================================
--- code/branches/presentation2011/data/levels/teamBaseMatch.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/teamBaseMatch.oxw	(revision 8977)
@@ -1,6 +1,7 @@
 <LevelInfo
  name = "Teambase Match"
- description = "Fight for the bases."
- tags = ""
+ description = "Fight for the bases. Capture bases by shooting at them and defend them against attackers."
+ tags = "gametype"
+ screenshot = "teambasematch.png"
 />
 
@@ -15,7 +16,5 @@
 
 <Level
- name         = "Presentation"
- description  = "A simple testlevel"
- gametype     = TeamBaseMatch
+ gametype = "TeamBaseMatch"
 >
 
Index: code/branches/presentation2011/data/levels/teamDeathMatch.oxw
===================================================================
--- code/branches/presentation2011/data/levels/teamDeathMatch.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/teamDeathMatch.oxw	(revision 8977)
@@ -2,5 +2,6 @@
  name = "Team Deathmatch"
  description = "Fight against each other in teams."
- tags = ""
+ tags = "gametype"
+ screenshot = "teamdeathmatch.png"
 />
 
@@ -15,7 +16,5 @@
 
 <Level
- name         = "Waypoints"
- description  = "Testing waypoings for AI controlled spaceships."
- gametype     = TeamDeathmatch
+ gametype = "TeamDeathmatch"
 >
   <templates>
Index: code/branches/presentation2011/data/levels/testStars.oxw
===================================================================
--- code/branches/presentation2011/data/levels/testStars.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/testStars.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "Level to test stars"
  tags = "test"
+ screenshot = "starstestlevel.png"
 />
 
@@ -16,8 +17,5 @@
 ?>
 
-<Level
- name         = "Sample"
- description  = "Just a few tests"
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/testSwallow.oxw
===================================================================
--- code/branches/presentation2011/data/levels/testSwallow.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/testSwallow.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "Level to test the swallow spaceship."
  tags = "test"
+ screenshot = "swallowtestlevel.png"
 />
 
@@ -13,9 +14,5 @@
 ?>
 
-<Level
- name         = "Presentation_swallow"
- description  = "presentation level for Orxonox Convention X"
-
->
+<Level>
 
   <templates>
Index: code/branches/presentation2011/data/levels/tetris.oxw
===================================================================
--- code/branches/presentation2011/data/levels/tetris.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/tetris.oxw	(revision 8977)
@@ -2,5 +2,6 @@
  name = "Tetris"
  description = "Tetris in space!"
- tags = ""
+ tags = "minigame"
+ screenshot = "tetris.png"
 />
 
@@ -30,7 +31,5 @@
 
 <Level
- name         = "Presentation"
- description  = "A simple testlevel"
- gametype     = "Tetris"
+ gametype = "Tetris"
 >
   <templates>
Index: code/branches/presentation2011/data/levels/theTimeMachine.oxw
===================================================================
--- code/branches/presentation2011/data/levels/theTimeMachine.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/theTimeMachine.oxw	(revision 8977)
@@ -2,5 +2,6 @@
  name = "The Time Machine"
  description = "A simple level. The only goal is to defeat as much enemies as you can."
- tags = "singleplayer"
+ tags = "gametype"
+ screenshot = "thetimemachine.png"
 />
 
@@ -61,7 +62,5 @@
 
 <Level
-    name="The Time Machine"
-    description="A simple level. The only goal is to defeat as much enemies as you can."
-    gametype=TeamDeathmatch
+ gametype = "TeamDeathmatch"
 >
     <templates>
Index: code/branches/presentation2011/data/levels/tutorial.oxw
===================================================================
--- code/branches/presentation2011/data/levels/tutorial.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/tutorial.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "Level for the coding tutorial."
  tags = "tutorial"
+ screenshot = "codingtutorial.png"
 />
 
@@ -12,8 +13,5 @@
 ?>
 
-<Level
- name         = "Presentation"
- description  = "A simple testlevel"
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
Index: code/branches/presentation2011/data/levels/underAttack.oxw
===================================================================
--- code/branches/presentation2011/data/levels/underAttack.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/underAttack.oxw	(revision 8977)
@@ -1,2 +1,9 @@
+<LevelInfo
+ name = "Under Attack"
+ description = "Fight the transporter."
+ tags = "gametype"
+ screenshot = "underattack.png"
+/>
+
 <?lua
   include("HUDTemplates3.oxo")
@@ -8,7 +15,5 @@
 
 <Level
- name         = "UnderAttack testing"
- description  = "A simple testlevel"
- gametype     = UnderAttack
+ gametype = "UnderAttack"
 >
   <templates>
Index: code/branches/presentation2011/data/levels/waypoints.oxw
===================================================================
--- code/branches/presentation2011/data/levels/waypoints.oxw	(revision 8976)
+++ code/branches/presentation2011/data/levels/waypoints.oxw	(revision 8977)
@@ -3,4 +3,5 @@
  description = "Testing waypoings for AI controlled spaceships."
  tags = "test"
+ screenshot = "waypointstestlevel.png"
 />
 
@@ -14,8 +15,5 @@
 ?>
 
-<Level
- name         = "Waypoints"
- description  = "Testing waypoings for AI controlled spaceships."
->
+<Level>
   <templates>
     <Template link=lodtemplate_default />
