Index: code/branches/cegui0.8_ogre1.9/data/gui/layouts/HostMenu.layout
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/layouts/HostMenu.layout	(revision 11798)
+++ code/branches/cegui0.8_ogre1.9/data/gui/layouts/HostMenu.layout	(revision 11799)
@@ -35,5 +35,5 @@
                 <Property name="MaxSize" value="{{1,0},{1,0}}" />
                 <Property name="Area" value="{{0.8,0},{0.87,0},{1,0},{.97,0}}" />
-                <Event function="HostMenu.MultiplayerShowAll_clicked" name="CheckStateChanged" />
+                <Event function="HostMenu.MultiplayerShowAll_clicked" name="SelectStateChanged" />
             </Window>
         </Window>
Index: code/branches/cegui0.8_ogre1.9/data/gui/scripts/GUITools.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/GUITools.lua	(revision 11798)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/GUITools.lua	(revision 11799)
@@ -31,6 +31,6 @@
 
     local lookAndFeel = CEGUI.WidgetLookManager:getSingleton():getWidgetLook(window:getLookNFeel())
-    local height = window:getFont():getLineSpacing() + window:getUnclippedOuterRect():getHeight() - lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window):getHeight()
-    local width =  window:getFont():getTextExtent(window:getText()) + window:getUnclippedOuterRect():getWidth() - lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window):getWidth()
+    local height = window:getFont():getLineSpacing() + window:getUnclippedOuterRect():get():getHeight() - lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window):getHeight()
+    local width =  window:getFont():getTextExtent(window:getText()) + window:getUnclippedOuterRect():get():getWidth() - lookAndFeel:getNamedArea("WithFrameTextRenderArea"):getArea():getPixelRect(window):getWidth()
 
     table.insert(size, height)
@@ -40,6 +40,6 @@
 
 function getScrollingStepSize(window)
-    local height = window:getUnclippedOuterRect():getHeight()
-    local maxHeight = CEGUI.System:getSingleton():getGUISheet():getUnclippedOuterRect():getHeight()
+    local height = window:getUnclippedOuterRect():get():getHeight()
+    local maxHeight = window:getRootWindow():getUnclippedOuterRect():get():getHeight()
     local ratio = height/maxHeight
     return 0.008*ratio/0.3204
Index: code/branches/cegui0.8_ogre1.9/data/gui/scripts/HostMenu.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/HostMenu.lua	(revision 11798)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/HostMenu.lua	(revision 11799)
@@ -11,16 +11,16 @@
 function P.onLoad()
     P.multiplayerMode = "startServer"
-    local window = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox")
-    local button = tolua.cast(window,"CEGUI::Checkbox")
+    local window = P.window:getChild("HostMenuWindow/MultiplayerShowAllCheckbox")
+    local button = tolua.cast(window,"CEGUI::ToggleButton")
     button:setSelected(false)
     P.createLevelList()
 
     P:setButton(1, 1, {
-            ["button"] = winMgr:getWindow("orxonox/HostMenuStartButton"),
+            ["button"] = P.window:getChild("HostMenuStartButton"),
             ["callback"]  = P.HostMenuStartButton_clicked
     })
 
     P:setButton(1, 2, {
-            ["button"] = winMgr:getWindow("orxonox/HostMenuBackButton"),
+            ["button"] = P.window:getChild("HostMenuBackButton"),
             ["callback"]  = P.HostMenuBackButton_clicked
     })
@@ -29,6 +29,6 @@
 function P.onShow()
     if P.showAll ~= orxonox.GUIManager:inDevMode() then
-        local window = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox")
-        local button = tolua.cast(window,"CEGUI::Checkbox")
+        local window = P.window:getChild("HostMenuWindow/MultiplayerShowAllCheckbox")
+        local button = tolua.cast(window,"CEGUI::ToggleButton")
         P.showAll = not P.showAll
         button:setSelected(P.showAll)
@@ -36,5 +36,5 @@
 
     if P.multiplayerMode == "startServer" then
-        local window = winMgr:getWindow("orxonox/HostMenuHostButton")
+        local window = P.window:getChild("HostMenuWindow/HostMenuHostButton")
         local button = tolua.cast(window,"CEGUI::RadioButton")
         button:setSelected(true)
@@ -43,5 +43,5 @@
 
     if P.multiplayerMode == "startDedicated" then
-        local window = winMgr:getWindow("orxonox/HostMenuDedicatedButton")
+        local window = P.window:getChild("HostMenuWindow/HostMenuDedicatedButton")
         local button = tolua.cast(window,"CEGUI::RadioButton")
         button:setSelected(true)
@@ -53,5 +53,5 @@
     P.levelList = {}
     P.itemList = {}
-    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/HostMenuListbox"))
+    local listbox = CEGUI.toListbox(P.window:getChild("HostMenuWindow/HostMenuListbox"))
     listbox:resetList()
     orxonox.GUIManager:setItemTooltipsEnabledHelper(listbox, true)
@@ -98,5 +98,5 @@
 
 function P.HostMenuStartButton_clicked(e)
-    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/HostMenuListbox"))
+    local listbox = CEGUI.toListbox(P.window:getChild("HostMenuWindow/HostMenuListbox"))
     local choice = listbox:getFirstSelectedItem()
     if choice ~= nil then
@@ -111,5 +111,5 @@
 
 function P.MultiplayerShowAll_clicked(e)
-    local checkbox = tolua.cast(winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox"), "CEGUI::Checkbox")
+    local checkbox = tolua.cast(P.window:getChild("HostMenuWindow/MultiplayerShowAllCheckbox"), "CEGUI::ToggleButton")
     local show = checkbox:isSelected()
     if show ~= P.showAll then
Index: code/branches/cegui0.8_ogre1.9/data/gui/scripts/MultiplayerMenu.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/MultiplayerMenu.lua	(revision 11798)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/MultiplayerMenu.lua	(revision 11799)
@@ -12,15 +12,15 @@
     --button are arranged in a 3x2 matrix, Join and Host buttons are in the upper left and middle, the back button in the lower right of the table
     P:setButton(1, 1, {
-            ["button"] = winMgr:getWindow("orxonox/MultiplayerJoinButton"),
+            ["button"] = P.window:getChild("MultiplayerJoinButton"),
             ["callback"]  = P.MultiplayerJoinButton_clicked
     })
 
     P:setButton(1, 2, {
-            ["button"] = winMgr:getWindow("orxonox/MultiplayerHostButton"),
+            ["button"] = P.window:getChild("MultiplayerHostButton"),
             ["callback"]  = P.MultiplayerHostButton_clicked
     })
 
     P:setButton(2, 3, {
-            ["button"] = winMgr:getWindow("orxonox/MultiplayerBackButton"),
+            ["button"] = P.window:getChild("MultiplayerBackButton"),
             ["callback"]  = P.MultiplayerBackButton_clicked
     })
@@ -31,10 +31,10 @@
 
     if P.joinMode == 1 then
-        local window = winMgr:getWindow("orxonox/MultiplayerLanButton")
+        local window = P.window:getChild("MultiplayerWindow/MultiplayerLanButton")
         local button = tolua.cast(window,"CEGUI::RadioButton")
         button:setSelected(true)
     end
     if P.joinMode == 2 then
-        local window = winMgr:getWindow("orxonox/MultiplayerInternetButton")
+        local window = P.window:getChild("MultiplayerWindow/MultiplayerInternetButton")
         local button = tolua.cast(window,"CEGUI::RadioButton")
         button:setSelected(true)
@@ -66,5 +66,5 @@
 
 function P.MultiplayerJoinButton_clicked(e)
-    local choice = winMgr:getWindow("orxonox/MultiplayerListbox"):getFirstSelectedItem()
+    local choice = P.window:getChild("MultiplayerWindow/MultiplayerListbox"):getFirstSelectedItem()
     local destination = nil
     if choice then
@@ -85,5 +85,5 @@
     -- LAN Discovery
     if P.joinMode == 1 then
-        local listbox = winMgr:getWindow("orxonox/MultiplayerListbox")
+        local listbox = P.window:getChild("MultiplayerWindow/MultiplayerListbox")
         CEGUI.toListbox(listbox):resetList()
         local discovery = orxonox.LANDiscovery:getInstance()
@@ -120,5 +120,5 @@
     -- WAN Discovery
     elseif P.joinMode == 2 then
-        local listbox = winMgr:getWindow("orxonox/MultiplayerListbox")
+        local listbox = P.window:getChild("MultiplayerWindow/MultiplayerListbox")
         CEGUI.toListbox(listbox):resetList()
         local discovery = orxonox.WANDiscovery()
Index: code/branches/cegui0.8_ogre1.9/data/gui/scripts/ShipSelectionMenu.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/ShipSelectionMenu.lua	(revision 11798)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/ShipSelectionMenu.lua	(revision 11799)
@@ -44,20 +44,20 @@
 
 function P.createFilterTab(name) -- generates filter tab and list box, sets handler for selection changes
-    tabName = "orxonox/ShipSelectionLevelTab"
+    tabName = "ShipSelectionLevelTab"
     -- create new tab window with desired name
     listbox = CEGUI.toListbox(winMgr:createWindow("MenuWidgets/Listbox", tabName))
     listbox:setText(name)
-    listbox:setProperty("UnifiedMaxSize", "{{1,0},{1,0}}")
+    listbox:setProperty("MaxSize", "{{1,0},{1,0}}")
     --[[TODO: smaller list if image and description is implemented.
-    listbox:setProperty("UnifiedAreaRect", "{{0.05,0},{0.1,0},{0.5,0},{0.675,0}}") --]]
-    listbox:setProperty("UnifiedAreaRect", "{{0,0},{0,0},{1,0},{1,0}}")
+    listbox:setProperty("Area", "{{0.05,0},{0.1,0},{0.5,0},{0.675,0}}") --]]
+    listbox:setProperty("Area", "{{0,0},{0,0},{1,0},{1,0}}")
     -- fill listbox with items
     P.update()
     -- listen to selection changes
-    orxonox.GUIManager:subscribeEventHelper(listbox, "ItemSelectionChanged", P.name..".ShipSelectionSelectionChanged")
-    local tabControl = winMgr:getWindow("orxonox/ShipSelectionTabControl")
-    orxonox.GUIManager:subscribeEventHelper(tabControl, "TabSelectionChanged", P.name..".ShipSelectionSelectionChanged")
+    orxonox.GUIManager:subscribeEventHelper(listbox, "SelectionChanged", P.name..".ShipSelectionSelectionChanged")
+    local tabControl = P.window:getChild("ShipSelectionWindow/ShipSelectionTabControl")
+    orxonox.GUIManager:subscribeEventHelper(tabControl, "SelectionChanged", P.name..".ShipSelectionSelectionChanged")
     if listbox:getItemCount() > 0 then
-        tabControl:addChildWindow(tabName)
+        tabControl:addChild(listbox)
     end
 end
@@ -65,5 +65,5 @@
 function P.ShipSelectionGetSelectedModel() --returns selected model, if available.
     -- choose the active listbox
-    local tabControl = CEGUI.toTabControl(winMgr:getWindow("orxonox/ShipSelectionTabControl"))
+    local tabControl = CEGUI.toTabControl(P.window:getChild("ShipSelectionWindow/ShipSelectionTabControl"))
     local listbox = CEGUI.toListbox(tabControl:getTabContentsAtIndex(tabControl:getSelectedTabIndex()))
     local choice = listbox:getFirstSelectedItem()
@@ -80,7 +80,7 @@
 function P.ShipSelectionSelectionChanged(e)
     --[[ TODO: Get image and description from template file
-    local levelImage = winMgr:getWindow("orxonox/ShipSelectionLevelImage")
-    local levelDescription = winMgr:getWindow("orxonox/ShipSelectionLevelDescription")
-    local configButton = winMgr:getWindow("orxonox/ShipSelectionConfigButton")
+    local levelImage = P.window:getChild("orxonox/ShipSelectionLevelImage")
+    local levelDescription = P.window:getChild("orxonox/ShipSelectionLevelDescription")
+    local configButton = P.window:getChild("orxonox/ShipSelectionConfigButton")
     local level = P.ShipSelectionGetSelectedModel()
     if level ~= nil then
Index: code/branches/cegui0.8_ogre1.9/data/gui/scripts/SingleplayerConfigMenu.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/SingleplayerConfigMenu.lua	(revision 11798)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/SingleplayerConfigMenu.lua	(revision 11799)
@@ -16,14 +16,14 @@
 
 function P.onLoad()
-    P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/SingleplayerConfigMenu/MiscConfigPane/SampleWindow")
+    P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "ConfigWindow/Wrapper/MiscConfigPane/SampleWindow")
     P.sampleWindow:setText("SampleText")
 
     P:setButton(1, 1, {
-            ["button"] = winMgr:getWindow("orxonox/SingleplayerConfigMenu/CancelButton"),
+            ["button"] = P.window:getChild("CancelButton"),
             ["callback"]  = P.SingleplayerConfigCancelButton_clicked
     })
     
     P:setButton(1, 2, {
-            ["button"] = winMgr:getWindow("orxonox/SingleplayerConfigMenu/OKButton"),
+            ["button"] = P.window:getChild("OKButton"),
             ["callback"]  = P.SingleplayerConfigOKButton_clicked
     })
@@ -88,5 +88,5 @@
     P.spaceWidth = 10
     
-    local pane = tolua.cast(winMgr:getWindow("orxonox/SingleplayerConfigMenu/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
@@ -98,39 +98,40 @@
     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)
+    local oldLine = P.window:getChildRecursive("ConfigCommand" .. k)
+    if oldLine ~= nil then
+        winMgr:destroyWindow(oldLine)
     end
     -- content window for the entire line
-    local line = winMgr:createWindow("DefaultWindow", "orxonox/SingleplayerConfigMenu/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/SingleplayerConfigMenu/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/SingleplayerConfigMenu/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 .. ".SingleplayerConfigEditbox_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/SingleplayerConfigMenu/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 .. ".SingleplayerConfigResetButton_clicked")
-    line:addChildWindow(reset)
+    line:addChild(reset)
     reset:setEnabled(false)
     offset = offset + P.resetWidth + P.spaceWidth
@@ -142,10 +143,10 @@
 
 function P.createLines()
-    local window = winMgr:getWindow("orxonox/SingleplayerConfigMenu/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
 
@@ -157,7 +158,7 @@
     for k,v in pairs(P.commandList) do
         -- save the changes
-        local editbox = winMgr:getWindow("orxonox/SingleplayerConfigMenu/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/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Reset")
+        local resetButton = P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane/ConfigCommand" .. k .. "/Reset")
         resetButton:setEnabled(false)
     end
@@ -172,10 +173,10 @@
 function P.SingleplayerConfigEditbox_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/SingleplayerConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Reset")
+    local resetButton = P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane/ConfigCommand" .. commandNr .. "/Reset")
     resetButton:setEnabled(true)
 end
@@ -183,5 +184,5 @@
 function P.SingleplayerConfigResetButton_clicked(e)
     local we = CEGUI.toWindowEventArgs(e)
-    local name = we.window:getName()
+    local name = we.window:getNamePath()
 
     local match = string.gmatch(name, "%d+")
@@ -189,5 +190,5 @@
 
     -- reload the old value
-    local editbox = winMgr:getWindow("orxonox/SingleplayerConfigMenu/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)
