Index: code/branches/presentation2/data/gui/scripts/AudioMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/AudioMenu.lua	(revision 6206)
+++ code/branches/presentation2/data/gui/scripts/AudioMenu.lua	(revision 6206)
@@ -0,0 +1,130 @@
+-- AudioMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    AudioMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "AudioMenu"
+P.layoutString = "AudioMenu.layout"
+
+function P:init()
+    soundMgr = orxonox.SoundManager:getInstance()
+    masterscrollbar_active = false
+    musicscrollbar_active = false
+    effectsscrollbar_active = false
+    mastervolume = soundMgr:getVolume(orxonox.SoundType.none)
+    musicvolume = soundMgr:getVolume(orxonox.SoundType.ambient)
+    effectsvolume = soundMgr:getVolume(orxonox.SoundType.effects)
+    window = tolua.cast(winMgr:getWindow("orxonox/MasterScrollbar"),"CEGUI::Scrollbar")
+    window:setScrollPosition(mastervolume)
+    window = tolua.cast(winMgr:getWindow("orxonox/MusicScrollbar"),"CEGUI::Scrollbar")
+    window:setScrollPosition(musicvolume)
+    window = tolua.cast(winMgr:getWindow("orxonox/EffectsScrollbar"),"CEGUI::Scrollbar")
+    window:setScrollPosition(effectsvolume)
+    dropdown = winMgr:getWindow("orxonox/AudioThemeCombobox")
+    local themeList = {}
+    table.insert(themeList, "Default")
+    table.insert(themeList, "Drum n' Bass")
+    for k,v in pairs(themeList) do
+        item = CEGUI.createListboxTextItem(v)        
+        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
+        CEGUI.toCombobox(dropdown):addItem(item)
+    end
+end
+
+function P.AudioMasterScrollbar_changed(e)
+    if masterscrollbar_active == false then
+        window = tolua.cast(winMgr:getWindow("orxonox/MasterScrollbar"),"CEGUI::Scrollbar")
+        volume = window:getScrollPosition()
+        orxonox.CommandExecutor:execute("config SoundManager soundVolume_ " .. volume)
+    end
+end
+
+function P.AudioMasterScrollbar_started(e)
+    masterscrollbar_active = true
+end
+
+function P.AudioMasterScrollbar_ended(e)
+    window = tolua.cast(winMgr:getWindow("orxonox/MasterScrollbar"),"CEGUI::Scrollbar")
+    volume = window:getScrollPosition()
+    orxonox.CommandExecutor:execute("config SoundManager soundVolume_ " .. volume)
+    masterscrollbar_active = false
+end
+
+function P.AudioMusicScrollbar_changed(e)
+    if musicscrollbar_active == false then
+        window = tolua.cast(winMgr:getWindow("orxonox/MusicScrollbar"),"CEGUI::Scrollbar")
+        volume = window:getScrollPosition()
+        orxonox.CommandExecutor:execute("config SoundManager ambientVolume_ " .. volume)
+    end
+end
+
+function P.AudioMusicScrollbar_started(e)
+    musicscrollbar_active = true
+end
+
+function P.AudioMusicScrollbar_ended(e)
+    window = tolua.cast(winMgr:getWindow("orxonox/MusicScrollbar"),"CEGUI::Scrollbar")
+    volume = window:getScrollPosition()
+    orxonox.CommandExecutor:execute("config SoundManager ambientVolume_ " .. volume)
+    musicscrollbar_active = false
+end
+
+function P.AudioEffectsScrollbar_changed(e)
+    if effectsscrollbar_active == false then
+        window = tolua.cast(winMgr:getWindow("orxonox/EffectsScrollbar"),"CEGUI::Scrollbar")
+        volume = window:getScrollPosition()
+        orxonox.CommandExecutor:execute("config SoundManager effectsVolume_ " .. volume)
+    end
+end
+
+function P.AudioEffectsScrollbar_started(e)
+    effectsscrollbar_active = true
+end
+
+function P.AudioEffectsScrollbar_ended(e)
+    window = tolua.cast(winMgr:getWindow("orxonox/EffectsScrollbar"),"CEGUI::Scrollbar")
+    volume = window:getScrollPosition()
+    orxonox.CommandExecutor:execute("config SoundManager effectsVolume_ " .. volume)
+    effectsscrollbar_active = false
+end
+
+function P.AudioMuteMasterCheckbox_clicked(e)
+--    if
+--        mastervolume = soundMgr:getVolume(orxonox.SoundType.none)
+--        window = tolua.cast(winMgr:getWindow("orxonox/MasterScrollbar"),"CEGUI::Scrollbar")
+--        window:setScrollPosition(0)
+--    end
+    soundMgr:toggleMute(orxonox.SoundType.none)
+end
+
+function P.AudioMuteMusicCheckbox_clicked(e)
+    soundMgr:toggleMute(orxonox.SoundType.ambient)
+end
+
+function P.AudioMuteEffectsCheckbox_clicked(e)
+    soundMgr:toggleMute(orxonox.SoundType.effects)
+end
+
+function P.AudioThemeCombobox_changed(e)
+--    local choice = winMgr:getWindow("orxonox/AudioThemeCombobox"):getFirstSelectedItem()
+--    if choice == "Default" then
+--        orxonox.CommandExecutor:execute("setMood default")
+--        debug("default selected")
+--    end
+--    if choice == "Drum 'n Bass" then
+--        orxonox.CommandExecutor:execute("setMood dnb")
+--        debug("dnb selected")
+--    end
+end
+
+function P.AudioBackButton_clicked(e)
+    hideGUI(P.filename)
+end
+
+return P
+
Index: code/branches/presentation2/data/gui/scripts/ControlsMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/ControlsMenu.lua	(revision 6206)
+++ code/branches/presentation2/data/gui/scripts/ControlsMenu.lua	(revision 6206)
@@ -0,0 +1,27 @@
+-- ControlsMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    ControlsMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "ControlsMenu"
+P.layoutString = "ControlsMenu.layout"
+
+function P.ControlsMouseControlsButton_clicked(e)
+    showGUI("MouseControlsMenu", true)
+end
+
+function P.ControlsKeyboardControlsButton_clicked(e)
+    showGUI("KeyboardControlsMenu", true)
+end
+
+function P.ControlsBackButton_clicked(e)
+    hideGUI(P.filename)
+end
+
+return P
+
Index: code/branches/presentation2/data/gui/scripts/CreditsMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/CreditsMenu.lua	(revision 6206)
+++ code/branches/presentation2/data/gui/scripts/CreditsMenu.lua	(revision 6206)
@@ -0,0 +1,19 @@
+-- CreditsMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    CreditsMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "CreditsMenu"
+P.layoutString = "CreditsMenu.layout"
+
+function P.CreditsBackButton_clicked(e)
+    hideGUI(P.filename)
+end
+
+return P
+
Index: code/branches/presentation2/data/gui/scripts/GameplayMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/GameplayMenu.lua	(revision 6206)
+++ code/branches/presentation2/data/gui/scripts/GameplayMenu.lua	(revision 6206)
@@ -0,0 +1,52 @@
+-- GameplayMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    GameplayMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "GameplayMenu"
+P.layoutString = "GameplayMenu.layout"
+
+function P:init()
+    dropdown = winMgr:getWindow("orxonox/ThemeCombobox")
+    local themeList = {}
+    table.insert(themeList, "Theme 1")
+    table.insert(themeList, "Theme 2")
+    table.insert(themeList, "Theme 3")
+    for k,v in pairs(themeList) do
+        item = CEGUI.createListboxTextItem(v)        
+        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
+        CEGUI.toCombobox(dropdown):addItem(item)
+    end
+end
+
+function P.GameplayThemeCombobox_changed(e)
+    -- theme
+    debug("event: theme")
+end
+
+function P.GameplayDifficultyEasyButton_clicked(e)
+    -- difficulty easy
+    debug("event: easy")
+end
+
+function P.GameplayDifficultyNormalButton_clicked(e)
+    -- difficulty normal
+    debug("event: normal")
+end
+
+function P.GameplayDifficultyHardButton_clicked(e)
+    -- difficulty hard
+    debug("event: hard")
+end
+
+function P.GameplayBackButton_clicked(e)
+    hideGUI(P.filename)
+end
+
+return P
+
Index: code/branches/presentation2/data/gui/scripts/GraphicsMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/GraphicsMenu.lua	(revision 6206)
+++ code/branches/presentation2/data/gui/scripts/GraphicsMenu.lua	(revision 6206)
@@ -0,0 +1,65 @@
+-- GraphicsMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    GraphicsMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "GraphicsMenu"
+P.layoutString = "GraphicsMenu.layout"
+
+function P:init()
+    dropdown = winMgr:getWindow("orxonox/ResolutionCombobox")
+    local resolutionList = {}
+    table.insert(resolutionList, "800 x 600  (4:3)")
+    table.insert(resolutionList, "1024 x 640  (16:10)")
+    table.insert(resolutionList, "1024 x 768  (4:3)")
+    table.insert(resolutionList, "1280 x 800  (16:10)")
+    table.insert(resolutionList, "1280 x 960  (4:3)")
+    table.insert(resolutionList, "1440 x 900  (16:10)")
+    table.insert(resolutionList, "1600 x 1200  (4:3)")
+    table.insert(resolutionList, "1680 x 1050  (16:10)")
+    for k,v in pairs(resolutionList) do
+        item = CEGUI.createListboxTextItem(v)        
+        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
+        CEGUI.toCombobox(dropdown):addItem(item)
+    end
+    local scrollbar_active = false
+end
+
+function P.GraphicsResolutionCombobox_changed(e)
+    -- resolution
+    debug("event: resolution")
+end
+
+function P.GraphicsBrightnessScrollbar_changed(e)
+    if scrollbar_active == false then
+        -- brightness
+        debug("event: brightness")
+    end
+end
+
+function P.GraphicsBrightnessScrollbar_started(e)
+    scrollbar_active = true
+end
+
+function P.GraphicsBrightnessScrollbar_ended(e)
+    -- brightness
+    debug("event: brightness")
+    scrollbar_active = false
+end
+
+function P.GraphicsFullscreenCheckbox_clicked(e)
+    -- fullscreen
+    debug("event: fullscreen")
+end
+
+function P.GraphicsBackButton_clicked(e)
+    hideGUI(P.filename)
+end
+
+return P
+
Index: code/branches/presentation2/data/gui/scripts/KeyboardControlsMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/KeyboardControlsMenu.lua	(revision 6206)
+++ code/branches/presentation2/data/gui/scripts/KeyboardControlsMenu.lua	(revision 6206)
@@ -0,0 +1,18 @@
+-- KeyboardControlsMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    KeyboardControlsMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "KeyboardControlsMenu"
+P.layoutString = "KeyboardControlsMenu.layout"
+
+function P.KeyboardControlsBackButton_clicked(e)
+    hideGUI(P.filename)
+end
+
+return P
Index: code/branches/presentation2/data/gui/scripts/MainMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/MainMenu.lua	(revision 6199)
+++ code/branches/presentation2/data/gui/scripts/MainMenu.lua	(revision 6206)
@@ -12,80 +12,27 @@
 P.layoutString = "MainMenu.layout"
 
-function P:init()
-    listbox = winMgr:getWindow("orxonox/LevelListbox")
-    preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
-    orxonox.LevelManager:getInstance():compileAvailableLevelList()
-    local levelList = {}
-    local index = 0
-    local level = ""
-    while true do
-      level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
-      if level == "" then
-        break
-      end
-      table.insert(levelList, level)
-      index = index + 1
-    end
-    table.sort(levelList)
-    for k,v in pairs(levelList) do
-        item = CEGUI.createListboxTextItem(v)        
-        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
-        CEGUI.toListbox(listbox):addItem(item)
-        if v .. ".oxw" == preselect then
-            listbox:setItemSelectState(item, true)
-        end
-    end
+-- events for MainMenu
+function P.QuickGameTestButton_clicked(e)
+    orxonox.CommandExecutor:execute("startGame")
 end
 
-
--- events for mainmenu
-function P.button_quit_clicked(e)
-    hideGUI()
-    orxonox.CommandExecutor:execute("exit")
+function P.SingleplayerButton_clicked(e)
+    showGUI("SingleplayerMenu", true)
 end
 
-function P.button_standalone_clicked(e)
-    choice = winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem()
-    if choice then
-        orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
-        orxonox.CommandExecutor:execute("startGame")
-        hideGUI(P.filename)
-    end
+function P.MultiplayerButton_clicked(e)
+    showGUI("MultiplayerMenu", true)
 end
 
-function P.button_server_clicked(e)
-    choice = winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem()
-    if choice then
-        orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
-        orxonox.CommandExecutor:execute("startServer")
-        hideGUI(P.filename)
-    end
+function P.SettingsButton_clicked(e)
+    showGUI("SettingsMenu", true)
 end
 
-function P.button_dedicated_clicked(e)
-    choice = winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem()
-    if choice then
-        orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
-        orxonox.CommandExecutor:execute("startDedicated")
-        hideGUI(P.filename)
-    end
+function P.CreditsButton_clicked(e)
+    showGUI("CreditsMenu", true)
 end
 
-function P.button_client_clicked(e)
-    choice = winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem()
-    if choice then
-        orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
-        orxonox.CommandExecutor:execute("startClient")
-        hideGUI(P.filename)
-
-    end
-end
-
-function P.listbox_level_selectionchanged(e)
-    if winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem() then
-        winMgr:getWindow("orxonox/StandaloneButton"):enable()
-    else
-        winMgr:getWindow("orxonox/StandaloneButton"):disable()
-    end
+function P.ExitButton_clicked(e)
+    orxonox.CommandExecutor:execute("exit")
 end
 
Index: code/branches/presentation2/data/gui/scripts/MouseControlsMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/MouseControlsMenu.lua	(revision 6206)
+++ code/branches/presentation2/data/gui/scripts/MouseControlsMenu.lua	(revision 6206)
@@ -0,0 +1,48 @@
+-- MouseControlsMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    MouseControlsMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "MouseControlsMenu"
+P.layoutString = "MouseControlsMenu.layout"
+
+local scrollbar_active = false
+
+function P.MouseControlsMouseScrollbar_changed(e)
+    if scrollbar_active == false then
+        -- mouse sensitivity
+        debug("event: mouse sensitivity")
+    end
+end
+
+function P.MouseControlsMouseScrollbar_started(e)
+    scrollbar_active = true
+end
+
+function P.MouseControlsMouseScrollbar_ended(e)
+    -- mouse sensitivity
+    debug("event: mouse sensitivity")
+    scrollbar_active = false
+end
+
+function P.MouseControlsDefaultButton_clicked(e)
+    -- default control mode
+    debug("event: default control mode")
+end
+
+function P.MouseControls_______Button_clicked(e)
+    -- .......
+    debug("event: .......")
+end
+
+function P.MouseControlsBackButton_clicked(e)
+    hideGUI(P.filename)
+end
+
+return P
+
Index: code/branches/presentation2/data/gui/scripts/MultiplayerMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/MultiplayerMenu.lua	(revision 6206)
+++ code/branches/presentation2/data/gui/scripts/MultiplayerMenu.lua	(revision 6206)
@@ -0,0 +1,82 @@
+-- MultiplayerMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    MultiplayerMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "MultiplayerMenu"
+P.layoutString = "MultiplayerMenu.layout"
+
+function P:init()
+    listbox = winMgr:getWindow("orxonox/MultiplayerLevelListbox")
+    preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
+    orxonox.LevelManager:getInstance():compileAvailableLevelList()
+    local levelList = {}
+    local index = 0
+    local level = ""
+    while true do
+        level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
+        if level == "" then
+            break
+        end
+        table.insert(levelList, level)
+        index = index + 1
+    end
+    table.sort(levelList)
+    for k,v in pairs(levelList) do
+        item = CEGUI.createListboxTextItem(v)        
+        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
+        CEGUI.toListbox(listbox):addItem(item)
+        if v .. ".oxw" == preselect then
+            listbox:setItemSelectState(item, true)
+        end
+    end
+    local multiplayerMode = "startClient"
+    if multiplayerMode == "startClient" then
+        window = winMgr:getWindow("orxonox/MultiplayerJoinButton")
+        button = tolua.cast(window,"CEGUI::RadioButton")
+        button:setSelected(true)
+    end
+    if multiplayerMode == "startServer" then
+        window = winMgr:getWindow("orxonox/MultiplayerHostButton")
+        button = tolua.cast(window,"CEGUI::RadioButton")
+        button:setSelected(true)
+    end
+    if multiplayerMode == "startDedicated" then
+        window = winMgr:getWindow("orxonox/MultiplayerDedicatedButton")
+        button = tolua.cast(window,"CEGUI::RadioButton")
+        button:setSelected(true)
+    end
+end
+
+function P.MultiplayerJoinButton_clicked(e)
+    multiplayerMode = "startClient"
+end
+
+function P.MultiplayerHostButton_clicked(e)
+    multiplayerMode = "startServer"
+end
+
+function P.MultiplayerDedicatedButton_clicked(e)
+    multiplayerMode = "startDedicated"
+end
+
+function P.MultiplayerStartButton_clicked(e)
+    local choice = winMgr:getWindow("orxonox/MultiplayerLevelListbox"):getFirstSelectedItem()
+    if choice then
+        orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
+        orxonox.CommandExecutor:execute(multiplayerMode)
+        hideAllGUIs()
+    end
+end
+
+function P.MultiplayerBackButton_clicked(e)
+    hideGUI(P.filename)
+end
+
+return P
+
Index: code/branches/presentation2/data/gui/scripts/MultiplayerOptionsMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/MultiplayerOptionsMenu.lua	(revision 6206)
+++ code/branches/presentation2/data/gui/scripts/MultiplayerOptionsMenu.lua	(revision 6206)
@@ -0,0 +1,18 @@
+-- MultiplayerOptionsMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    MultiplayerOptionsMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "MultiplayerOptionsMenu"
+P.layoutString = "MultiplayerOptionsMenu.layout"
+
+function P.MultiplayerOptionsBackButton_clicked(e)
+    hideGUI(P.filename)
+end
+
+return P
Index: code/branches/presentation2/data/gui/scripts/SettingsMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/SettingsMenu.lua	(revision 6206)
+++ code/branches/presentation2/data/gui/scripts/SettingsMenu.lua	(revision 6206)
@@ -0,0 +1,44 @@
+-- SettingsMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    SettingsMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "SettingsMenu"
+P.layoutString = "SettingsMenu.layout"
+
+function P.SettingsGameplayButton_clicked(e)
+    showGUI("GameplayMenu", true)
+end
+
+function P.SettingsMultiplayerOptionsButton_clicked(e)
+    showGUI("MultiplayerOptionsMenu", true)
+end
+
+function P.SettingsControlsButton_clicked(e)
+    showGUI("ControlsMenu", true)
+end
+
+function P.SettingsGraphicsButton_clicked(e)
+    showGUI("GraphicsMenu", true)
+end
+
+function P.SettingsAudioButton_clicked(e)
+    showGUI("AudioMenu", true)
+end
+
+function P.SettingsResetSettingsButton_clicked(e)
+    -- reset settings
+    debug("event: reset settings")
+end
+
+function P.SettingsBackButton_clicked(e)
+    hideGUI(P.filename)
+end
+
+return P
+
Index: code/branches/presentation2/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/SingleplayerMenu.lua	(revision 6206)
+++ code/branches/presentation2/data/gui/scripts/SingleplayerMenu.lua	(revision 6206)
@@ -0,0 +1,54 @@
+-- SingleplayerMenu.lua
+
+BasicGUI = require("BasicGUI")
+local P = BasicGUI:new() --inherit everything from the gui package
+if _REQUIREDNAME == nil then
+    SingleplayerMenu = P
+else
+    _G[_REQUIREDNAME] = P
+end
+
+P.filename = "SingleplayerMenu"
+P.layoutString = "SingleplayerMenu.layout"
+
+function P:init()
+    listbox = winMgr:getWindow("orxonox/SingleplayerLevelListbox")
+    preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
+    orxonox.LevelManager:getInstance():compileAvailableLevelList()
+    local levelList = {}
+    local index = 0
+    local level = ""
+    while true do
+      level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
+      if level == "" then
+        break
+      end
+      table.insert(levelList, level)
+      index = index + 1
+    end
+    table.sort(levelList)
+    for k,v in pairs(levelList) do
+        item = CEGUI.createListboxTextItem(v)        
+        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
+        CEGUI.toListbox(listbox):addItem(item)
+        if v .. ".oxw" == preselect then
+            listbox:setItemSelectState(item, true)
+        end
+    end
+end
+
+function P.SingleplayerStartButton_clicked(e)
+    choice = winMgr:getWindow("orxonox/SingleplayerLevelListbox"):getFirstSelectedItem()
+    if choice then
+        orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
+        orxonox.CommandExecutor:execute("startGame")
+        hideAllGUIs()
+    end
+end
+
+function P.SingleplayerBackButton_clicked(e)
+    hideGUI(P.filename)
+end
+
+return P
+
