Index: code/branches/cegui0.8_ogre1.9/data/gui/scripts/MiscConfigMenu.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/MiscConfigMenu.lua	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/MiscConfigMenu.lua	(revision 11800)
@@ -18,5 +18,4 @@
 
     P.commandList = {}
-    table.insert(P.commandList, "Highscore playerName_")
     table.insert(P.commandList, "KeyBinder mouseSensitivity_")
     table.insert(P.commandList, "KeyBinder mouseSensitivityDerived_")
@@ -24,6 +23,6 @@
     table.insert(P.commandList, "KeyBinder mouseWheelStepSize_")
     table.insert(P.commandList, "Shell maxHistoryLength_")
-    table.insert(P.commandList, "Core bStartIOConsole_")
-    table.insert(P.commandList, "Game fpsLimit_")
+    table.insert(P.commandList, "CoreConfig bStartIOConsole_")
+    table.insert(P.commandList, "GraphicsSettings fpsLimit")
     table.insert(P.commandList, "Spectator speed_")
     table.insert(P.commandList, "SpaceShip bInvertYAxis_")
@@ -34,15 +33,14 @@
     table.insert(P.commandList, "Gametype numberOfBots_")
     table.insert(P.commandList, "UnderAttack gameTime_")
-    table.insert(P.commandList, "TeamDeathmatch teams_")
+    table.insert(P.commandList, "TeamGametype teams_")
     table.insert(P.commandList, "TeamDeathmatch maxScore_")
     table.insert(P.commandList, "HumanPlayer nick_")
     table.insert(P.commandList, "ChatOverlay displayTime_")
-    table.insert(P.commandList, "Core bDevMode_")
+    table.insert(P.commandList, "CoreConfig bDevMode_")
     table.insert(P.commandList, "HUDNavigation MarkerLimit_")
-    table.insert(P.commandList, "HUDNavigation showDistance")
+    table.insert(P.commandList, "HUDNavigation showDistance_")
     table.insert(P.commandList, "HUDRadar RadarMode_")
 
     P.nameList = {}
-    table.insert(P.nameList, "Playername")
     table.insert(P.nameList, "Mouse sensitivity")
     table.insert(P.nameList, "Mouse acceleration")
@@ -60,5 +58,5 @@
     table.insert(P.nameList, "Number of Bots")
     table.insert(P.nameList, "UnderAttack: game time")
-    table.insert(P.nameList, "TeamDeathmatch: Number of teams")
+    table.insert(P.nameList, "TeamGametype: Number of teams")
     table.insert(P.nameList, "TeamDeathmatch: Score needed to end the game")
     table.insert(P.nameList, "Playername")
@@ -72,5 +70,5 @@
 
     --Calculate design parameters:
-    P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/MiscConfigMenu/MiscConfigPane/SampleWindow")
+    P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "MiscConfigMenu/MiscConfigPane/SampleWindow")
     P.sampleWindow:setText("SampleText")
 
@@ -93,5 +91,5 @@
     P.spaceWidth = 10
     
-    local pane = tolua.cast(winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane"), "CEGUI::ScrollablePane")
+    local pane = tolua.cast(P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane"), "CEGUI::ScrollablePane")
     size = pane:getViewableArea()
     P.editboxWidth = size:getWidth() - P.commandWidth - P.resetWidth - 5*P.spaceWidth
@@ -100,10 +98,10 @@
 
     P:setButton(1, 1, {
-            ["button"] = winMgr:getWindow("orxonox/MiscConfigMenu/CancelButton"),
+            ["button"] = P.window:getChild("CancelButton"),
             ["callback"]  = P.MiscConfigCancelButton_clicked
     })
     
     P:setButton(1, 2, {
-            ["button"] = winMgr:getWindow("orxonox/MiscConfigMenu/OKButton"),
+            ["button"] = P.window:getChild("OKButton"),
             ["callback"]  = P.MiscConfigOKButton_clicked
     })
@@ -113,35 +111,35 @@
     local offset = 0
     -- content window for the entire line
-    local line = winMgr:createWindow("DefaultWindow", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k)
+    local line = winMgr:createWindow("DefaultWindow", "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")
+    local command = winMgr:createWindow("MenuWidgets/StaticText", "Command")
     command:setText(P.nameList[k])
-    command:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.commandWidth), CEGUI.UDim(1, 0)))
+    command:setSize(CEGUI.USize(CEGUI.UDim(0, P.commandWidth), CEGUI.UDim(1, 0)))
     command:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0, 0)))
-    line:addChildWindow(command)
+    line:addChild(command)
     offset = offset + P.commandWidth + P.spaceWidth
 
     -- config value (editable)
-    local configvalue = winMgr:createWindow("MenuWidgets/Editbox", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Configvalue")
+    local configvalue = winMgr:createWindow("MenuWidgets/Editbox", "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:setSize(CEGUI.USize(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)
+    line:addChild(configvalue)
     offset = offset + P.editboxWidth + 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)))
+    local reset = winMgr:createWindow("MenuWidgets/Button", "Reset")
+    reset:setSize(CEGUI.USize(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 .. ".MiscConfigResetButton_clicked")
-    line:addChildWindow(reset)
+    line:addChild(reset)
     reset:setEnabled(false)
     offset = offset + P.resetWidth + P.spaceWidth
@@ -153,10 +151,10 @@
 
 function P.createLines()
-    local window = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane")
+    local window = P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane")
 
     for k,v in pairs(P.commandList) do
         local line = P.createLine(k)
         table.insert(P.linesList, line)
-        window:addChildWindow(line)
+        window:addChild(line)
     end
 
@@ -168,7 +166,7 @@
     for k,v in pairs(P.commandList) do
         -- save the changes
-        local editbox = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Configvalue")
+        local editbox = P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane/ConfigCommand" .. k .. "/Configvalue")
         orxonox.CommandExecutor:execute("config " .. P.commandList[k] .. " " .. editbox:getText())
-        local resetButton = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Reset")
+        local resetButton = P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane/ConfigCommand" .. k .. "/Reset")
         resetButton:setEnabled(false)
     end
@@ -183,10 +181,10 @@
 function P.MiscConfigEditbox_textAccepted(e)
     local we = CEGUI.toWindowEventArgs(e)
-    local name = we.window:getName()
+    local name = we.window:getNamePath()
 
     local match = string.gmatch(name, "%d+")
     local commandNr = tonumber(match())
 
-    local resetButton = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Reset")
+    local resetButton = P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane/ConfigCommand" .. commandNr .. "/Reset")
     resetButton:setEnabled(true)
 end
@@ -194,5 +192,5 @@
 function P.MiscConfigResetButton_clicked(e)
     local we = CEGUI.toWindowEventArgs(e)
-    local name = we.window:getName()
+    local name = we.window:getNamePath()
 
     local match = string.gmatch(name, "%d+")
@@ -200,5 +198,5 @@
 
     -- reload the old value
-    local editbox = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Configvalue")
+    local editbox = P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane/ConfigCommand" .. commandNr .. "/Configvalue")
     local value = orxonox.CommandExecutor:query("getConfig " .. P.commandList[commandNr])
     editbox:setText(value)
