[Orxonox-commit 7189] r11806 - in code/branches/cegui0.8_ogre1.9/data/gui: layouts scripts

landauf at orxonox.net landauf at orxonox.net
Sat Feb 24 03:09:05 CET 2018


Author: landauf
Date: 2018-02-24 03:09:05 +0100 (Sat, 24 Feb 2018)
New Revision: 11806

Modified:
   code/branches/cegui0.8_ogre1.9/data/gui/layouts/Dialog.layout
   code/branches/cegui0.8_ogre1.9/data/gui/layouts/DockingDialog.layout
   code/branches/cegui0.8_ogre1.9/data/gui/layouts/PickupInventory.layout
   code/branches/cegui0.8_ogre1.9/data/gui/layouts/QuestGUI.layout
   code/branches/cegui0.8_ogre1.9/data/gui/layouts/UndockingDialog.layout
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/Dialog.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/DockingDialog.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/InGameMenu.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/PickupInventory.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/QuestGUI.lua
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/UndockingDialog.lua
Log:
migrated all ingame menus to cegui 0.8

Modified: code/branches/cegui0.8_ogre1.9/data/gui/layouts/Dialog.layout
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/layouts/Dialog.layout	2018-02-24 01:50:16 UTC (rev 11805)
+++ code/branches/cegui0.8_ogre1.9/data/gui/layouts/Dialog.layout	2018-02-24 02:09:05 UTC (rev 11806)
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='utf-8'?>
 <GUILayout version="4">
-    <Window name="Background" type="DefaultWindow">
+    <Window name="DialogBackground" type="DefaultWindow">
         <Property name="InheritsAlpha" value="False" />
         <Property name="MaxSize" value="{{1,0},{1,0}}" />
         <Property name="Area" value="{{0,0},{0,0},{1,0},{1,0}}" />
@@ -7,7 +7,7 @@
         <Window name="Options" type="MenuWidgets/StaticText">
             <Property name="Alpha" value="0.8" />
             <Property name="InheritsAlpha" value="False" />
-            <Property name="HorzFormatting" value="HorzCentred" />
+            <Property name="HorzFormatting" value="CentreAligned" />
             <Property name="MaxSize" value="{{1,0},{1,0}}" />
             <Property name="VertFormatting" value="TopAligned" />
             <Property name="Area" value="{{0.15,0},{0.15,0},{0.85,0},{0.8,0}}" />
@@ -22,7 +22,7 @@
             <Window name="QuestionWrapper" type="MenuWidgets/StaticText">
                 <Property name="InheritsAlpha" value="False" />
                 <Property name="MaxSize" value="{{1,0},{1,0}}" />
-                <Property name="HorzFormatting" value="HorzCentred" />
+                <Property name="HorzFormatting" value="CentreAligned" />
                 <Property name="VertFormatting" value="TopAligned" />
                 <Property name="Area" value="{{0.3,0},{0.05,0},{0.95,0},{0.45,0}}" />
                 <Window name="QuestionPane" type="MenuWidgets/ScrollablePane">
@@ -39,7 +39,7 @@
                         <Property name="Alpha" value="0.8" />
                         <Property name="InheritsAlpha" value="False" />
                         <Property name="HorzFormatting" value="WordWrapLeftAligned" />
-                        <Property name="VertFormatting" value="CentreAligned" />
+                        <Property name="VertFormatting" value="TopAligned" />
                         <Property name="MaxSize" value="{{1,0},{1,0}}" />
                         <Property name="Area" value="{{0,0},{0,0},{1,0},{1,0}}" />
                     </Window>
@@ -48,7 +48,7 @@
             <Window name="AnsListbox" type="MenuWidgets/Listbox">
                 <Property name="MaxSize" value="{{1,0},{1,0}}" />
                 <Property name="Area" value="{{0.05,0},{0.5,0},{0.95,0},{0.85,0}}" />
-                <Event function="Dialog.answer_changed" name="ItemSelectionChanged" />
+                <Event function="Dialog.answer_changed" name="SelectionChanged" />
             </Window>
             <Window name="SayButton" type="MenuWidgets/Button">
                 <Property name="Text" value="Say" />

Modified: code/branches/cegui0.8_ogre1.9/data/gui/layouts/DockingDialog.layout
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/layouts/DockingDialog.layout	2018-02-24 01:50:16 UTC (rev 11805)
+++ code/branches/cegui0.8_ogre1.9/data/gui/layouts/DockingDialog.layout	2018-02-24 02:09:05 UTC (rev 11806)
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='utf-8'?>
 <GUILayout version="4">
-    <Window name="Background" type="MenuWidgets/StaticImage">
+    <Window name="DockingBackground" type="MenuWidgets/StaticImage">
         <Property name="FrameEnabled" value="False" />
         <Property name="InheritsAlpha" value="False" />
         <Property name="MaxSize" value="{{1,0},{1,0}}" />
@@ -10,7 +10,7 @@
             <Property name="Text" value="Docking" />
             <Property name="Alpha" value="0.8" />
             <Property name="InheritsAlpha" value="False" />
-            <Property name="HorzFormatting" value="HorzCentred" />
+            <Property name="HorzFormatting" value="CentreAligned" />
             <Property name="MaxSize" value="{{1,0},{1,0}}" />
             <Property name="VertFormatting" value="TopAligned" />
             <Property name="Area" value="{{0.25,0},{0.2875,0},{0.75,0},{0.7,0}}" />

Modified: code/branches/cegui0.8_ogre1.9/data/gui/layouts/PickupInventory.layout
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/layouts/PickupInventory.layout	2018-02-24 01:50:16 UTC (rev 11805)
+++ code/branches/cegui0.8_ogre1.9/data/gui/layouts/PickupInventory.layout	2018-02-24 02:09:05 UTC (rev 11806)
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='utf-8'?>
 <GUILayout version="4">
-    <Window name="Background" type="DefaultWindow">
+    <Window name="PickupInventoryBackground" type="DefaultWindow">
         <Property name="InheritsAlpha" value="False" />
         <Property name="MaxSize" value="{{1,0},{1,0}}" />
         <Property name="Area" value="{{0,0},{0,0},{1,0},{1,0}}" />
@@ -8,7 +8,7 @@
             <Property name="Text" value="Pickup Inventory" />
             <Property name="Alpha" value="0.8" />
             <Property name="InheritsAlpha" value="False" />
-            <Property name="HorzFormatting" value="HorzCentred" />
+            <Property name="HorzFormatting" value="CentreAligned" />
             <Property name="MaxSize" value="{{1,0},{1,0}}" />
             <Property name="VertFormatting" value="TopAligned" />
             <Property name="Area" value="{{0.15,0},{0.15,0},{0.85,0},{0.8,0}}" />
@@ -16,7 +16,7 @@
                 <Property name="TextColours" value="FF4444FF" />
                 <Property name="InheritsAlpha" value="False" />
                 <Property name="MaxSize" value="{{1,0},{1,0}}" />
-                <Property name="HorzFormatting" value="HorzCentred" />
+                <Property name="HorzFormatting" value="CentreAligned" />
                 <Property name="VertFormatting" value="TopAligned" />
                 <Property name="Area" value="{{0.05,0},{0.15,0},{0.95,0},{0.92,0}}" />
                 <Window name="Inventory" type="MenuWidgets/ScrollablePane">

Modified: code/branches/cegui0.8_ogre1.9/data/gui/layouts/QuestGUI.layout
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/layouts/QuestGUI.layout	2018-02-24 01:50:16 UTC (rev 11805)
+++ code/branches/cegui0.8_ogre1.9/data/gui/layouts/QuestGUI.layout	2018-02-24 02:09:05 UTC (rev 11806)
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='utf-8'?>
 <GUILayout version="4">
-    <Window name="Background" type="DefaultWindow">
+    <Window name="QuestBackground" type="DefaultWindow">
         <Property name="InheritsAlpha" value="False" />
         <Property name="Area" value="{{0,0},{0,0},{1,0},{1,0}}" />
         <Window name="MainWindow" type="DefaultWindow">
@@ -23,7 +23,7 @@
                 </Window>
                 <Window name="QuestsList" type="MenuWidgets/Listbox">
                     <Property name="Area" value="{{0,0},{0,30},{1,0},{1,0}}" />
-                    <Event function="QuestGUI.changeQuest_clicked" name="ItemSelectionChanged" />
+                    <Event function="QuestGUI.changeQuest_clicked" name="SelectionChanged" />
                 </Window>
             </Window>
             <Window name="RightPanel" type="MenuWidgets/StaticText">
@@ -49,7 +49,7 @@
                         <Window name="SubquestsList" type="MenuWidgets/Listbox">
                             <Property name="Area" value="{{0,0},{0,0},{1,0},{1,0}}" />
                             <Property name="InheritsAlpha" value="False" />
-                            <Event function="QuestGUI.changeToSubquest_clicked" name="ItemSelectionChanged" />
+                            <Event function="QuestGUI.changeToSubquest_clicked" name="SelectionChanged" />
                         </Window>
                         <Window name="Hints" type="MenuWidgets/StaticText">
                             <Property name="Area" value="{{0,0},{0,0},{1,0},{0,0}}" />

Modified: code/branches/cegui0.8_ogre1.9/data/gui/layouts/UndockingDialog.layout
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/layouts/UndockingDialog.layout	2018-02-24 01:50:16 UTC (rev 11805)
+++ code/branches/cegui0.8_ogre1.9/data/gui/layouts/UndockingDialog.layout	2018-02-24 02:09:05 UTC (rev 11806)
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='utf-8'?>
 <GUILayout version="4">
-    <Window name="Background" type="MenuWidgets/StaticImage">
+    <Window name="UndockingBackground" type="MenuWidgets/StaticImage">
         <Property name="FrameEnabled" value="False" />
         <Property name="InheritsAlpha" value="False" />
         <Property name="MaxSize" value="{{1,0},{1,0}}" />
@@ -10,7 +10,7 @@
             <Property name="Text" value="Undocking" />
             <Property name="Alpha" value="0.8" />
             <Property name="InheritsAlpha" value="False" />
-            <Property name="HorzFormatting" value="HorzCentred" />
+            <Property name="HorzFormatting" value="CentreAligned" />
             <Property name="MaxSize" value="{{1,0},{1,0}}" />
             <Property name="VertFormatting" value="TopAligned" />
             <Property name="Area" value="{{0.25,0},{0.2875,0},{0.75,0},{0.7,0}}" />

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/Dialog.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/Dialog.lua	2018-02-24 01:50:16 UTC (rev 11805)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/Dialog.lua	2018-02-24 02:09:05 UTC (rev 11806)
@@ -31,15 +31,15 @@
     local manager = orxonox.DialogManager:getInstance()
     
     
-    local personfield = winMgr:getWindow("orxonox/Dialog/Person")
+    local personfield = P.window:getChild("Options/Person")
     local person = manager:getPerson()
     personfield:setText(person)
 
-    local questionfield = winMgr:getWindow("orxonox/Dialog/Question")
+    local questionfield = P.window:getChild("Options/QuestionWrapper/QuestionPane/Question")
     local question = manager:getQuestion()
     questionfield:setText(question)
 
-    local listboxwindow = winMgr:getWindow("orxonox/AnsListbox")
+    local listboxwindow = P.window:getChild("Options/AnsListbox")
     CEGUI.toListbox(listboxwindow):resetList()
 
     local ansList = {}
@@ -51,7 +51,7 @@
 
     for k,v in pairs(ansList) do
         item = CEGUI.createListboxTextItem(v)
-        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
         CEGUI.toListbox(listboxwindow):addItem(item)
     end
 end
@@ -60,11 +60,11 @@
     local manager = orxonox.DialogManager:getInstance()
     manager:update(P.choice)
 
-    local questionfield = winMgr:getWindow("orxonox/Dialog/Question")
+    local questionfield = P.window:getChild("Options/QuestionWrapper/QuestionPane/Question")
     local question = manager:getQuestion()
     questionfield:setText(question)
 
-    local listboxwindow = winMgr:getWindow("orxonox/AnsListbox")
+    local listboxwindow = P.window:getChild("Options/AnsListbox")
     listboxwindow:resetList()
 
     local ansList = {}
@@ -76,7 +76,7 @@
 
     for k,v in pairs(ansList) do
         item = CEGUI.createListboxTextItem(v)
-        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        item:setSelectionBrushImage(menuImageSet .. "/MultiListSelectionBrush")
         CEGUI.toListbox(listboxwindow):addItem(item)
     end
 
@@ -84,7 +84,7 @@
 end
 
 function P.answer_changed(e)    --wird aufgerufen falls Auswahl geaendert wird und setzt enstprechenden Indexparameter  
-    listboxwindow = winMgr:getWindow("orxonox/AnsListbox")
+    listboxwindow = P.window:getChild("Options/AnsListbox")
     selection = listboxwindow:getFirstSelectedItem()
     if selection ~= nil then
     P.choice = listboxwindow:getItemIndex(selection)

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/DockingDialog.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/DockingDialog.lua	2018-02-24 01:50:16 UTC (rev 11805)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/DockingDialog.lua	2018-02-24 02:09:05 UTC (rev 11806)
@@ -8,12 +8,12 @@
 
      --button are arranged in a 1x2 matrix
     P:setButton(1, 1, {
-            ["button"] = winMgr:getWindow("orxonox/Docking/DockButton"),
+            ["button"] = P.window:getChild("DockButton"),
             ["callback"]  = P.dockButton_clicked
     })
 
     P:setButton(1, 2, {
-            ["button"] = winMgr:getWindow("orxonox/Docking/CancelButton"),
+            ["button"] = P.window:getChild("CancelButton"),
             ["callback"]  = P.cancelButton_clicked
     })
     
@@ -36,7 +36,7 @@
         table.insert(P.docks, orxonox.Dock:getActiveDockAtIndex(i))
     end
 
-    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/Docking/Docks"))
+    local listbox = CEGUI.toListbox(P.window:getChild("Title/Docks"))
     listbox:resetList()
 
     for k in pairs(P.docks) do
@@ -50,7 +50,7 @@
 end
 
 function P.dockButton_clicked(e)
-    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/Docking/Docks"))
+    local listbox = CEGUI.toListbox(P.window:getChild("Title/Docks"))
     local choice = listbox:getFirstSelectedItem()
     if choice ~= nil then
         local index = listbox:getItemIndex(choice)

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/InGameMenu.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/InGameMenu.lua	2018-02-24 01:50:16 UTC (rev 11805)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/InGameMenu.lua	2018-02-24 02:09:05 UTC (rev 11806)
@@ -8,27 +8,27 @@
 
     --button are arranged in a 5x1 matrix, the left lower item is nil
     P:setButton(1, 1, {
-            ["button"] = winMgr:getWindow("orxonox/InGameMenu_ReturnButton"),
+            ["button"] = P.window:getChild("InGameMenu_ReturnButton"),
             ["callback"]  = P.button_return_clicked
     })
 
     P:setButton(2, 1, {
-            ["button"] = winMgr:getWindow("orxonox/InGameMenu_ReloadLevelButton"),
+            ["button"] = P.window:getChild("InGameMenu_ReloadLevelButton"),
             ["callback"]  = P.button_reloadLevel_clicked
     })
 
     P:setButton(3, 1, {
-            ["button"] = winMgr:getWindow("orxonox/InGameMenu_MainMenuButton"),
+            ["button"] = P.window:getChild("InGameMenu_MainMenuButton"),
             ["callback"]  = P.button_mainmenu_clicked
     })
 
     P:setButton(4, 1, {
-            ["button"] = winMgr:getWindow("orxonox/InGameMenu_SettingsButton"),
+            ["button"] = P.window:getChild("InGameMenu_SettingsButton"),
             ["callback"]  = P.button_settings_clicked
     })
 
     P:setButton(5, 1, {
-            ["button"] = winMgr:getWindow("orxonox/InGameMenu_QuitButton"),
+            ["button"] = P.window:getChild("InGameMenu_QuitButton"),
             ["callback"]  = P.button_quit_clicked
     })
 end

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/PickupInventory.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/PickupInventory.lua	2018-02-24 01:50:16 UTC (rev 11805)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/PickupInventory.lua	2018-02-24 02:09:05 UTC (rev 11806)
@@ -42,8 +42,8 @@
         if v ~= nil then
             local pickup = P.detailPickups[k]
             if pickup ~= nil and pickup ~= 0 then
-                local useButton = winMgr:getWindow("orxonox/PickupInventory/Details" .. k .. "/UseButton")
-                local dropButton = winMgr:getWindow("orxonox/PickupInventory/Details" .. k .. "/DropButton")
+                local useButton = P.window:getChild("Details" .. k .. "/Wrapper/UseButton")
+                local dropButton = P.window:getChild("Details" .. k .. "/Wrapper/DropButton")
                 if orxonox.PickupManager:getInstance():isValidPickup(pickup.pickup) == false then
                     useButton:setEnabled(false)
                     dropButton:setEnabled(false)
@@ -82,10 +82,10 @@
 function P.createInventory()
     local pickupManager = orxonox.PickupManager:getInstance()
     
-    local root = winMgr:getWindow("orxonox/PickupInventory/Inventory")
-    P.wrapper = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/PickupInventory/Inventory/Wrapper")
-    P.wrapper:setSize(CEGUI.UVector2(CEGUI.UDim(1,0),CEGUI.UDim(1,0)))
-    root:addChildWindow(P.wrapper)
+    local root = P.window:getChild("PickupInventory/Wrapper/Inventory")
+    P.wrapper = winMgr:createWindow("MenuWidgets/ScrollablePane", "Wrapper")
+    P.wrapper:setSize(CEGUI.USize(CEGUI.UDim(1,0),CEGUI.UDim(1,0)))
+    root:addChild(P.wrapper)
     
     P.pickupsList = {}
 
@@ -97,8 +97,8 @@
         table.insert(P.pickupsList, pickup)
         local window = P.createPickupEntry(counter, pickup)
         window:setYPosition(CEGUI.UDim(0,offset))
-        offset = offset + window:getHeight():asAbsolute(1)
-        P.wrapper:addChildWindow(window)
+        offset = offset + P.imageHeight
+        P.wrapper:addChild(window)
         counter = counter + 1
     end
 
@@ -107,29 +107,29 @@
 function P.createPickupEntry(index, pickup)
     local representation = orxonox.PickupManager:getInstance():getRepresentation(pickup.representationName)
 
-    local name = "orxonox/PickupInventory/Box/Pickup" .. index
+    local name = "Pickup" .. index
 
     local item = winMgr:createWindow("MenuWidgets/StaticText", name)
-    item:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0), CEGUI.UDim(0, P.imageHeight)))
+    item:setSize(CEGUI.USize(CEGUI.UDim(1, 0), CEGUI.UDim(0, P.imageHeight)))
     item:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0)))
 
-    local image = winMgr:createWindow("MenuWidgets/StaticImage", name .. "/Image")
+    local image = winMgr:createWindow("MenuWidgets/StaticImage", "Image")
     image:setProperty("Image", "PickupInventory/" .. representation:getInventoryRepresentation())
     image:setProperty("BackgroundEnabled", "set:False")
     image:setProperty("FrameEnabled", "set:True")
-    image:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.imageHeight), CEGUI.UDim(0, P.imageHeight)))
-    item:addChildWindow(image)
+    image:setSize(CEGUI.USize(CEGUI.UDim(0, P.imageHeight), CEGUI.UDim(0, P.imageHeight)))
+    item:addChild(image)
 
-    local title = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Title")
+    local title = winMgr:createWindow("MenuWidgets/StaticText", "Title")
     title:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.imageHeight+5), CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
-    title:setSize(CEGUI.UVector2(CEGUI.UDim(0.3, 0), CEGUI.UDim(0, P.textHeight)))
+    title:setSize(CEGUI.USize(CEGUI.UDim(0.3, 0), CEGUI.UDim(0, P.textHeight)))
     title:setText(representation:getPickupName())
     title:setProperty("FrameEnabled", "set:False")
-    item:addChildWindow(title)
+    item:addChild(title)
 
-    local useButton = winMgr:createWindow("MenuWidgets/Button", name .. "/UseButton")
+    local useButton = winMgr:createWindow("MenuWidgets/Button", "UseButton")
     useButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.3, P.imageHeight+10),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
-    useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
+    useButton:setSize(CEGUI.USize(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
     if pickup.inUse == false then
         useButton:setText("use")
         if pickup.usable == false then
@@ -142,21 +142,21 @@
         end
     end
     orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseUnuseButton_clicked")
-    item:addChildWindow(useButton)
+    item:addChild(useButton)
 
-    local dropButton = winMgr:createWindow("MenuWidgets/Button", name .. "/DropButton")
+    local dropButton = winMgr:createWindow("MenuWidgets/Button", "DropButton")
     dropButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.3, P.imageHeight+15+P.buttonWidth),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
-    dropButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
+    dropButton:setSize(CEGUI.USize(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
     dropButton:setText("drop")
     orxonox.GUIManager:subscribeEventHelper(dropButton, "Clicked", P.name .. ".InventoryDropButton_clicked")
-    item:addChildWindow(dropButton)
+    item:addChild(dropButton)
 
-    local detailsButton = winMgr:createWindow("MenuWidgets/Button", name .. "/DetailsButton")
+    local detailsButton = winMgr:createWindow("MenuWidgets/Button", "DetailsButton")
     detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.3, P.imageHeight+20+2*P.buttonWidth),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
-    detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
+    detailsButton:setSize(CEGUI.USize(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
     detailsButton:setText("details")
     orxonox.GUIManager:subscribeEventHelper(detailsButton, "Clicked", P.name .. ".InventoryDetailsButton_clicked")
-    item:addChildWindow(detailsButton)
+    item:addChild(detailsButton)
 
     return item
 end
@@ -179,7 +179,7 @@
 
 function P.windowToPickupHelper(e)
     local we = CEGUI.toWindowEventArgs(e)
-    local name = we.window:getName()
+    local name = we.window:getNamePath()
 
     local match = string.gmatch(name, "%d+")
     local pickupIndex = tonumber(match())
@@ -192,48 +192,47 @@
     local representation = orxonox.PickupManager:getInstance():getRepresentation(pickup.representationName)
 
     local index = P.getNewDetailNumber()
-    local name = "orxonox/PickupInventory/Details" .. index
+    local name = "Details" .. index
     
     local window = winMgr:createWindow("MenuWidgets/FrameWindow", name)
-    window:setSize(CEGUI.UVector2(CEGUI.UDim(0.5,0),CEGUI.UDim(0.4,0)))
+    window:setSize(CEGUI.USize(CEGUI.UDim(0.5,0),CEGUI.UDim(0.4,0)))
     orxonox.GUIManager:subscribeEventHelper(window, "CloseClicked", P.name .. ".closeDetailWindow")
     
-    local root = winMgr:getWindow("orxonox/PickupInventory/Background")
-    root:addChildWindow(window)
+    P.window:addChild(window)
     
-    local wrapper = winMgr:createWindow("DefaultWindow", name .. "/Wrapper")
-    wrapper:setSize(CEGUI.UVector2(CEGUI.UDim(1, -20),CEGUI.UDim(1, -50)))
+    local wrapper = winMgr:createWindow("DefaultWindow", "Wrapper")
+    wrapper:setSize(CEGUI.USize(CEGUI.UDim(1, -20),CEGUI.UDim(1, -50)))
     wrapper:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 10),CEGUI.UDim(0, 40)))
-    window:addChildWindow(wrapper)
+    window:addChild(wrapper)
     
-    local title = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Title")
+    local title = winMgr:createWindow("MenuWidgets/StaticText", "Title")
     title:setText(representation:getPickupName())
     title:setHeight(CEGUI.UDim(0, P.textHeight))
     title:setProperty("FrameEnabled", "set:False")
     title:setProperty("BackgroundEnabled", "set:False")
-    wrapper:addChildWindow(title)
+    wrapper:addChild(title)
     
-    local image = winMgr:createWindow("MenuWidgets/StaticImage", name .. "/Image")
+    local image = winMgr:createWindow("MenuWidgets/StaticImage", "Image")
     image:setProperty("Image", "PickupInventory/" .. representation:getInventoryRepresentation())
     image:setProperty("BackgroundEnabled", "set:False")
     image:setProperty("FrameEnabled", "set:True")
-    image:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.detailImageSize), CEGUI.UDim(0, P.detailImageSize)))
+    image:setSize(CEGUI.USize(CEGUI.UDim(0, P.detailImageSize), CEGUI.UDim(0, P.detailImageSize)))
     image:setYPosition(CEGUI.UDim(0, P.textHeight + 5))
-    wrapper:addChildWindow(image)
+    wrapper:addChild(image)
     
-    local box = winMgr:createWindow("MenuWidgets/ScrollablePane", name .. "/Description")
-    box:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -1*(P.detailImageSize + 10)),CEGUI.UDim(1, -(P.textHeight + 5 + P.textHeight + 20))))
+    local box = winMgr:createWindow("MenuWidgets/ScrollablePane", "Description")
+    box:setSize(CEGUI.USize(CEGUI.UDim(1.0, -1*(P.detailImageSize + 10)),CEGUI.UDim(1, -(P.textHeight + 5 + P.textHeight + 20))))
     box:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.detailImageSize + 10),CEGUI.UDim(0, P.textHeight + 5)))
-    local description = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description/Text")
+    local description = winMgr:createWindow("MenuWidgets/StaticText", "Text")
     description:setText(representation:getPickupDescription())
     description:setProperty("HorzFormatting", "WordWrapLeftAligned")
     description:setProperty("VertFormatting", "TopAligned")
-    box:addChildWindow(description)
-    wrapper:addChildWindow(box)
+    box:addChild(description)
+    wrapper:addChild(box)
 
-    local useButton = winMgr:createWindow("MenuWidgets/Button", name .. "/UseButton")
+    local useButton = winMgr:createWindow("MenuWidgets/Button", "UseButton")
     useButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.detailImageSize+10),CEGUI.UDim(1, -40)))
-    useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
+    useButton:setSize(CEGUI.USize(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
     if pickup.inUse == false then
         useButton:setText("use")
         if pickup.usable == false then
@@ -246,14 +245,14 @@
         end
     end
     orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseUnuseDetailButton_clicked")
-    wrapper:addChildWindow(useButton)
+    wrapper:addChild(useButton)
     
-    local dropButton = winMgr:createWindow("MenuWidgets/Button", name .. "/DropButton")
+    local dropButton = winMgr:createWindow("MenuWidgets/Button", "DropButton")
     dropButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.detailImageSize+10+P.buttonWidth+10),CEGUI.UDim(1, -40)))
-    dropButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
+    dropButton:setSize(CEGUI.USize(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
     dropButton:setText("drop")
     orxonox.GUIManager:subscribeEventHelper(dropButton, "Clicked", P.name .. ".InventoryDropDetailButton_clicked")
-    wrapper:addChildWindow(dropButton)
+    wrapper:addChild(dropButton)
 
     P.detailsWindows[index] = window
     P.detailPickups[index] = pickup
@@ -310,7 +309,7 @@
 function P.closeDetailWindow(e)
     --Get some numbers from the window
     local we = CEGUI.toWindowEventArgs(e)
-    local name = we.window:getName()
+    local name = we.window:getNamePath()
     local match = string.gmatch(name, "%d+")
     local detailNr = tonumber(match())
     

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/QuestGUI.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/QuestGUI.lua	2018-02-24 01:50:16 UTC (rev 11805)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/QuestGUI.lua	2018-02-24 02:09:05 UTC (rev 11806)
@@ -39,7 +39,7 @@
 -- Loads the list of quests, depending on P.showActive, either the active (P.showActive == true) or the finished, i.e. inactive quests are loaded.
 -- selectQuest is a pointer to a quest that should be selected, if it is nil the first quest is selected.
 function P.loadQuestsList(selectQuest)
-    local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/QuestsList"))
+    local list = CEGUI.toListbox(P.window:getChild("MainWindow/LeftPanel/QuestsList"))
     P.clearQuestList()
 
     local selectQuestId = nil
@@ -123,11 +123,11 @@
 
         -- Load title and description
         local description = P.questManager:getDescription(quest)
-        local titleWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Title")
+        local titleWindow = P.window:getChild("MainWindow/Title")
         titleWindow:setText(description:getTitle())
-        local descriptionWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Description")
+        local descriptionWindow = P.window:getChild("MainWindow/RightPanel/ScrollWrapper/Wrapper/Description")
         descriptionWindow:setText(description:getDescription())
-        descriptionWindow:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(1, 0)))
+        descriptionWindow:setSize(CEGUI.USize(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(1, 0)))
         descriptionWindow:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderSize), CEGUI.UDim(0, P.borderSize)))
         local height = getStaticTextWindowHeight(descriptionWindow)
         descriptionWindow:setHeight(CEGUI.UDim(0, height))
@@ -134,7 +134,7 @@
         offset = offset + height
 
         -- Load subquests
-        local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/Quest/SubquestsList"))
+        local list = CEGUI.toListbox(P.window:getChild("MainWindow/RightPanel/ScrollWrapper/Wrapper/SubquestsList"))
         local numQuests = P.questManager:getNumSubQuests(quest, P.player)
         local i = 0
         while i <= numQuests-1 do
@@ -149,14 +149,14 @@
         if height > 0 then
             height = height+P.frameHeigth
         end
-        list:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(0, height)))
+        list:setSize(CEGUI.USize(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(0, height)))
         list:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderSize), CEGUI.UDim(0, offset)))
         offset = offset + height + P.borderSize
 
         -- Load hints
-        local hintsWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Hints")
+        local hintsWindow = P.window:getChild("MainWindow/RightPanel/ScrollWrapper/Wrapper/Hints")
         hintsWindow:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderSize), CEGUI.UDim(0, offset)))
-        hintsWindow:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(0, 0)))
+        hintsWindow:setSize(CEGUI.USize(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(0, 0)))
         height = P.titleHeight
         local numHints = P.questManager:getNumHints(quest, P.player)
         local i = 0
@@ -172,8 +172,8 @@
         offset = offset + height
 
         -- Set the size of the wrapper
-        local window = winMgr:getWindow("orxonox/QuestGUI/Quest/Wrapper")
-        window:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize-P.scrollbarWidth), CEGUI.UDim(0,offset+P.borderSize)))
+        local window = P.window:getChild("MainWindow/RightPanel/ScrollWrapper/Wrapper")
+        window:setSize(CEGUI.USize(CEGUI.UDim(1, -P.borderSize-P.scrollbarWidth), CEGUI.UDim(0,offset+P.borderSize)))
     end
 end
 
@@ -180,37 +180,37 @@
 -- Clear the currently displayed quest.
 function P.clearQuest()
     -- clear title
-    local titleWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Title")
+    local titleWindow = P.window:getChild("MainWindow/Title")
     titleWindow:setText("no Quests")
 
     -- clear description
-    local descriptionWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Description")
+    local descriptionWindow = P.window:getChild("MainWindow/RightPanel/ScrollWrapper/Wrapper/Description")
     descriptionWindow:setText("There is currently no quest that can be displayed.")
 
     -- clear list fo subquests
-    local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/Quest/SubquestsList"))
+    local list = CEGUI.toListbox(P.window:getChild("MainWindow/RightPanel/ScrollWrapper/Wrapper/SubquestsList"))
     list:resetList()
     list:setHeight(CEGUI.UDim(0, 0))
     P.subquests = {}
 
     -- clear hints
-    local hints = winMgr:getWindow("orxonox/QuestGUI/Quest/Hints")
+    local hints = P.window:getChild("MainWindow/RightPanel/ScrollWrapper/Wrapper/Hints")
     local numChildren = hints:getChildCount()-2 -- TODO: HACK
     local i = 0
     while i < numChildren do
-        local hint = hints:getChild("orxonox/QuestGUI/Quest/Hints/" .. i)
+        local hint = hints:getChild("" .. i)
         if hint ~= nil then
-            hints:removeChildWindow(hint)
+            hints:removeChild(hint)
             winMgr:destroyWindow(hint)
         end
         i = i+1
     end
-    hints:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.scrollbarWidth-P.borderSize), CEGUI.UDim(0, 0)))
+    hints:setSize(CEGUI.USize(CEGUI.UDim(1, -P.scrollbarWidth-P.borderSize), CEGUI.UDim(0, 0)))
 end
 
 -- Clear the quests list
 function P.clearQuestList()
-    local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/QuestsList"))
+    local list = CEGUI.toListbox(P.window:getChild("MainWindow/LeftPanel/QuestsList"))
     list:resetList()
     P.quests = {}
 end
@@ -252,15 +252,15 @@
 -- offset is the current offset in the hintsWindow.
 function P.insertHint(hintsWindow, hint, index, offset)
     -- Create the window for the hint.
-    local window = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/QuestGUI/Quest/Hints/" .. index)
+    local window = winMgr:createWindow("MenuWidgets/StaticText", "" .. index)
     window:setProperty("HorzFormatting", "WordWrapLeftAligned")
     window:setProperty("VertFormatting", "TopAligned")
     window:setProperty("FrameEnabled", "false")
     window:setID(index)
-    hintsWindow:addChildWindow(window)
+    hintsWindow:addChild(window)
     local description = P.questManager:getDescription(hint)
     window:setText(description:getDescription())
-    window:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(1, 0)))
+    window:setSize(CEGUI.USize(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(1, 0)))
     local height = getStaticTextWindowHeight(window)
     window:setHeight(CEGUI.UDim(0, height))
     window:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderSize), CEGUI.UDim(0, offset)))
@@ -285,7 +285,7 @@
 
 -- Change to a new quest.
 function P.changeQuest_clicked(e)
-    local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/QuestsList"))
+    local list = CEGUI.toListbox(P.window:getChild("MainWindow/LeftPanel/QuestsList"))
     local choice = list:getFirstSelectedItem()
     if choice ~= nil then
         local index = list:getItemIndex(choice)
@@ -298,8 +298,8 @@
 
 -- Change to a new subquest.
 function P.changeToSubquest_clicked(e)
-    local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/Quest/SubquestsList"))
-    local questsList = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/QuestsList"))
+    local list = CEGUI.toListbox(P.window:getChild("MainWindow/RightPanel/ScrollWrapper/Wrapper/SubquestsList"))
+    local questsList = CEGUI.toListbox(P.window:getChild("MainWindow/LeftPanel/QuestsList"))
     local choice = list:getFirstSelectedItem()
     if choice ~= nil then
         local index = list:getItemIndex(choice)
@@ -327,7 +327,7 @@
     local index = 0
 
     local questWindow = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/QuestGUI/Quests")
-    questWindow:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0),CEGUI.UDim(1, 0)))
+    questWindow:setSize(CEGUI.USize(CEGUI.UDim(1, 0),CEGUI.UDim(1, 0)))
 
     -- Iterate through all root-quests.
     local numRootQuests = orxonox.QuestManager:getInstance():getNumRootQuests(P.player)
@@ -347,9 +347,9 @@
     local node = winMgr:createWindow("MenuWidgets/TabButton", name)
     node:setText(orxonox.QuestManager:getInstance():getDescription(parent):getTitle())
     node:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.indentWidth*depth), CEGUI.UDim(0, P.buttonHeight*index)))
-    node:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.indentWidth*depth-P.scrollbarWidth), CEGUI.UDim(0, P.buttonHeight)))
+    node:setSize(CEGUI.USize(CEGUI.UDim(1, -P.indentWidth*depth-P.scrollbarWidth), CEGUI.UDim(0, P.buttonHeight)))
     orxonox.GUIManager:subscribeEventHelper(node, "Clicked", P.name .. ".openDetails_clicked")
-    root:addChildWindow(node)
+    root:addChild(node)
     
     table.insert(P.quests, parent)
 
@@ -388,7 +388,7 @@
 function P.openDetails_clicked(e)
     --Get some numbers from the window
     local we = CEGUI.toWindowEventArgs(e)
-    local name = we.window:getName()
+    local name = we.window:getNamePath()
     local match = string.gmatch(name, "%d+")
     local questNr = tonumber(match())
 
@@ -396,7 +396,7 @@
     quest = P.quests[questNr]
 
     local details = winMgr:createWindow("MenuWidgets/FrameWindow", name)
-    details:setSize(CEGUI.UVector2(CEGUI.UDim(0.7, 0), CEGUI.UDim(0.7, 0)))
+    details:setSize(CEGUI.USize(CEGUI.UDim(0.7, 0), CEGUI.UDim(0.7, 0)))
     details:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0), CEGUI.UDim(0.1, 0)))
     details:setText(orxonox.QuestManager:getInstance():getDescription(quest):getTitle())
     details:setProperty("Alpha", 1.0)
@@ -407,14 +407,14 @@
 
     name = name .. "/Scrollable"
     local window = winMgr:createWindow("MenuWidgets/ScrollablePane", name)
-    window:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -2*P.borderWidth),CEGUI.UDim(1.0, -P.titleHeight)))
+    window:setSize(CEGUI.USize(CEGUI.UDim(1.0, -2*P.borderWidth),CEGUI.UDim(1.0, -P.titleHeight)))
     window:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderWidth), CEGUI.UDim(0, P.titleHeight)))
-    details:addChildWindow(window)
+    details:addChild(window)
 
     local offset = 0
 
     local status = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Status")
-    window:addChildWindow(status)
+    window:addChild(status)
     status:setProperty("HorzFormatting", "WordWrapLeftAligned")
     status:setProperty("VertFormatting", "TopAligned")
     if quest:isActive(P.player) then
@@ -425,29 +425,29 @@
         status:setText("This quest was failed.")
     end
     status:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, offset)))
-    status:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
+    status:setSize(CEGUI.USize(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
     local height = getStaticTextWindowHeight(status)
     status:setHeight(CEGUI.UDim(0, height))
     offset = offset + height
 
     local descriptionTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description/Title")
-    window:addChildWindow(descriptionTitle)
-    descriptionTitle:setProperty("HorzFormatting", "HorzCentred")
+    window:addChild(descriptionTitle)
+    descriptionTitle:setProperty("HorzFormatting", "CentreAligned")
     descriptionTitle:setProperty("VertFormatting", "TopAligned")
     descriptionTitle:setText("Description:")
     descriptionTitle:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, offset)))
-    descriptionTitle:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
+    descriptionTitle:setSize(CEGUI.USize(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
     height = getStaticTextWindowHeight(descriptionTitle)
     descriptionTitle:setHeight(CEGUI.UDim(0, height))
     offset = offset + height
 
     local description = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description")
-    window:addChildWindow(description)
+    window:addChild(description)
     description:setProperty("HorzFormatting", "WordWrapLeftAligned")
     description:setProperty("VertFormatting", "TopAligned")
     description:setText(orxonox.QuestManager:getInstance():getDescription(quest):getDescription())
     description:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, offset)))
-    description:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
+    description:setSize(CEGUI.USize(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
     height = getStaticTextWindowHeight(description)
     description:setHeight(CEGUI.UDim(0, height))
     offset = offset + height
@@ -456,12 +456,12 @@
     local numHints = orxonox.QuestManager:getInstance():getNumHints(quest, P.player)
     if numHints > 0 then
         local hintsTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Hints/Title")
-        window:addChildWindow(hintsTitle)
-        hintsTitle:setProperty("HorzFormatting", "HorzCentred")
+        window:addChild(hintsTitle)
+        hintsTitle:setProperty("HorzFormatting", "CentreAligned")
         hintsTitle:setProperty("VertFormatting", "TopAligned")
         hintsTitle:setText("Hints:")
         hintsTitle:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, offset)))
-        hintsTitle:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
+        hintsTitle:setSize(CEGUI.USize(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
         height = getStaticTextWindowHeight(hintsTitle)
         hintsTitle:setHeight(CEGUI.UDim(0, height))
         offset = offset + height
@@ -474,8 +474,8 @@
         local node = winMgr:createWindow("MenuWidgets/TabButton", name .. "/Hints" .. number)
         node:setText(orxonox.QuestManager:getInstance():getDescription(hint):getTitle())
         node:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, offset)))
-        node:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.scrollbarWidth), CEGUI.UDim(0, P.buttonHeight)))
-        window:addChildWindow(node)
+        node:setSize(CEGUI.USize(CEGUI.UDim(1, -P.scrollbarWidth), CEGUI.UDim(0, P.buttonHeight)))
+        window:addChild(node)
         offset = offset + P.buttonHeight
 
         orxonox.GUIManager:subscribeEventHelper(node, "Clicked", P.name .. ".openHintDetails_clicked")
@@ -482,8 +482,8 @@
         i = i+1
     end
 
-    local window = winMgr:getWindow("orxonox/QuestGUI/Background")
-    window:addChildWindow(details)
+    local window = P.window:getChild("orxonox/QuestGUI/Background")
+    window:addChild(details)
 end
 
 function P.getNewDetailNumber()
@@ -498,7 +498,7 @@
 
 function P.closeDetails_clicked(e)
     local we = CEGUI.toWindowEventArgs(e)
-    local name = we.window:getName()
+    local name = we.window:getNamePath()
     local match = string.gmatch(name, "%d+")
     match()
     local detailsNr = tonumber(match())
@@ -510,7 +510,7 @@
 function P.openHintDetails_clicked(e)
     --Get some numbers from the window
     local we = CEGUI.toWindowEventArgs(e)
-    local name = we.window:getName()
+    local name = we.window:getNamePath()
     local match = string.gmatch(name, "%d+")
     match()
     match()
@@ -520,7 +520,7 @@
     hint = P.hints[hintNr]
 
     local details = winMgr:createWindow("MenuWidgets/FrameWindow", name)
-    details:setSize(CEGUI.UVector2(CEGUI.UDim(0.7, 0), CEGUI.UDim(0.7, 0)))
+    details:setSize(CEGUI.USize(CEGUI.UDim(0.7, 0), CEGUI.UDim(0.7, 0)))
     details:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0), CEGUI.UDim(0.1, 0)))
     details:setText(orxonox.QuestManager:getInstance():getDescription(hint):getTitle())
     details:setProperty("Alpha", 1.0)
@@ -531,40 +531,40 @@
 
     name = name .. "/Scrollable"
     local window = winMgr:createWindow("MenuWidgets/ScrollablePane", name)
-    window:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -2*P.borderWidth),CEGUI.UDim(1.0, -P.titleHeight)))
+    window:setSize(CEGUI.USize(CEGUI.UDim(1.0, -2*P.borderWidth),CEGUI.UDim(1.0, -P.titleHeight)))
     window:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderWidth), CEGUI.UDim(0, P.titleHeight)))
-    details:addChildWindow(window)
+    details:addChild(window)
 
     local offset = 0
     
     local descriptionTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description/Title")
-    window:addChildWindow(descriptionTitle)
-    descriptionTitle:setProperty("HorzFormatting", "HorzCentred")
+    window:addChild(descriptionTitle)
+    descriptionTitle:setProperty("HorzFormatting", "CentreAligned")
     descriptionTitle:setProperty("VertFormatting", "TopAligned")
     descriptionTitle:setText("Description:")
     descriptionTitle:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, offset)))
-    descriptionTitle:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
+    descriptionTitle:setSize(CEGUI.USize(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
     height = getStaticTextWindowHeight(descriptionTitle)
     descriptionTitle:setHeight(CEGUI.UDim(0, height))
     offset = offset + height
 
     local description = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description")
-    window:addChildWindow(description)
+    window:addChild(description)
     description:setProperty("HorzFormatting", "WordWrapLeftAligned")
     description:setProperty("VertFormatting", "TopAligned")
     description:setText(orxonox.QuestManager:getInstance():getDescription(hint):getDescription())
     description:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, offset)))
-    description:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
+    description:setSize(CEGUI.USize(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
     height = getStaticTextWindowHeight(description)
     description:setHeight(CEGUI.UDim(0, height))
 
-    local window = winMgr:getWindow("orxonox/QuestGUI/Background")
-    window:addChildWindow(details)
+    local window = P.window:getChild("orxonox/QuestGUI/Background")
+    window:addChild(details)
 end
 
 function P.closeHintDetails_clicked(e)
     local we = CEGUI.toWindowEventArgs(e)
-    local name = we.window:getName()
+    local name = we.window:getNamePath()
     local match = string.gmatch(name, "%d+")
     match()
     match()

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/UndockingDialog.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/UndockingDialog.lua	2018-02-24 01:50:16 UTC (rev 11805)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/UndockingDialog.lua	2018-02-24 02:09:05 UTC (rev 11806)
@@ -8,12 +8,12 @@
 
      --button are arranged in a 1x2 matrix
     P:setButton(1, 1, {
-            ["button"] = winMgr:getWindow("orxonox/Undocking/DockButton"),
+            ["button"] = P.window:getChild("DockButton"),
             ["callback"]  = P.undockButton_clicked
     })
 
     P:setButton(1, 2, {
-            ["button"] = winMgr:getWindow("orxonox/Undocking/CancelButton"),
+            ["button"] = P.window:getChild("CancelButton"),
             ["callback"]  = P.cancelButton_clicked
     })
     
@@ -36,7 +36,7 @@
         table.insert(P.docks, orxonox.Dock:getActiveDockAtIndex(i))
     end
 
-    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/Undocking/Docks"))
+    local listbox = CEGUI.toListbox(P.window:getChild("Title/Docks"))
     listbox:resetList()
 
     for k in pairs(P.docks) do
@@ -50,7 +50,7 @@
 end
 
 function P.undockButton_clicked(e)
-    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/Undocking/Docks"))
+    local listbox = CEGUI.toListbox(P.window:getChild("Title/Docks"))
     local choice = listbox:getFirstSelectedItem()
     if choice ~= nil then
         local index = listbox:getItemIndex(choice)



More information about the Orxonox-commit mailing list