[Orxonox-commit 7185] r11802 - in code/branches/cegui0.8_ogre1.9: data/gui/scripts data/levels data/levels/includes src/modules/notifications

landauf at orxonox.net landauf at orxonox.net
Sat Feb 24 01:49:10 CET 2018


Author: landauf
Date: 2018-02-24 01:49:10 +0100 (Sat, 24 Feb 2018)
New Revision: 11802

Modified:
   code/branches/cegui0.8_ogre1.9/data/gui/scripts/NotificationLayer.lua
   code/branches/cegui0.8_ogre1.9/data/levels/AnihilationThreat.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/ArrowLevel.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/ProtectBoss.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/expeditionSector.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/iJohnVane_TriptoArea51.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/iiJohnVane_Area51UnderFire.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/iiiJohnVane_EscapeTheBastards.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/includes/notifications.oxi
   code/branches/cegui0.8_ogre1.9/data/levels/kecks.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/maxim.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/missionOne.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/notifications.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/presentationFS11.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/presentationHS11.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/presentationHS12.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/shuttleAttack.oxw
   code/branches/cegui0.8_ogre1.9/data/levels/shuttleRetaliation.oxw
   code/branches/cegui0.8_ogre1.9/src/modules/notifications/NotificationManager.cc
Log:
migrated NotificationLayer.lua to cegui 0.8

Modified: code/branches/cegui0.8_ogre1.9/data/gui/scripts/NotificationLayer.lua
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/gui/scripts/NotificationLayer.lua	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/gui/scripts/NotificationLayer.lua	2018-02-24 00:49:10 UTC (rev 11802)
@@ -9,18 +9,17 @@
 -- Loads the queues from the NotificationManager and creates the sample window, that is used to measure the width various strings need.
 function P.onLoad()
     orxonox.NotificationManager:getInstance():loadQueues()
-    P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/SampleWindow")
+    P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "NotificationLayer/Root/SampleWindow")
 end
 
 -- Creates a queue in the GUI.
 function P.createQueue(name, size)
-    local root = winMgr:getWindow("orxonox/NotificationLayer/Root")
     --local queue = winMgr:createWindow("MenuWidgets/Listbox", "orxonox/NotificationLayer/Root/Queue/" .. name)
     --queue:setProperty("BackgroundColor", "00FFFFFF") -- Set background to be fully transparent.
-    local queue = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/NotificationLayer/Root/Queue/" .. name)
+    local queue = winMgr:createWindow("MenuWidgets/ScrollablePane", name)
     queue:setProperty("Alpha", 0.0)
     --queue:setProperty("FrameEnabled", "false")
-    root:addChildWindow(queue)
+    P.window:addChild(queue)
 
     local queueTuple =
     {
@@ -37,7 +36,7 @@
     }
     
     queue:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0)))
-    queue:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, 0), CEGUI.UDim(0, P.queueHeightHelper(queueTuple, size))))
+    queue:setSize(CEGUI.USize(CEGUI.UDim(1.0, 0), CEGUI.UDim(0, P.queueHeightHelper(queueTuple, size))))
 
     P.queueList[name] = queueTuple -- name access
     P.setVisible(queueTuple, false) -- Set the queue to invisible as long as there are no notifications in it.
@@ -48,7 +47,7 @@
     local queue = P.queueList[queueName]
 
     if queue ~= nil then
-        queue.window:getParent():removeChildWindow(queue.window)
+        queue.window:getParent():removeChild(queue.window)
         winMgr:destroyWindow(queue.window)
     end
     P.queueList[queueName] = nil
@@ -65,7 +64,7 @@
         notification = string.gsub(notification, "%[", "\\%[") -- escape '[' which is used to format text since cegui 0.7
     end
 
-    local item = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/Queue/" .. queueName .. "/" .. queue.last)
+    local item = winMgr:createWindow("MenuWidgets/StaticText", queue.last)
     item:setText(notification)
     P.setItemFontHelper(item, queue, true)
     -- Add the item to the top of the queue.
@@ -76,8 +75,8 @@
             item:setYPosition(CEGUI.UDim(0, itemHeight*(queue.last-i)))
         end
     end
-    queue.window:addChildWindow(item)
-    item:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0), CEGUI.UDim(0, itemHeight)))
+    queue.window:addChild(item)
+    item:setSize(CEGUI.USize(CEGUI.UDim(1, 0), CEGUI.UDim(0, itemHeight)))
     item:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0)))
     item:setProperty("Alpha", 1.0)
     item:setProperty("InheritsAlpha", "false")
@@ -101,7 +100,7 @@
     end
     local item = queue.items[queue.first]
     -- Removes the item from the bottom of the queue.
-    queue.window:removeChildWindow(item)
+    queue.window:removeChild(item)
     winMgr:destroyWindow(item)
     queue.first = queue.first+1
 
@@ -126,7 +125,7 @@
 
     -- Removes the item.
     local item = queue.items[index]
-    queue.window:removeChildWindow(item)
+    queue.window:removeChild(item)
     winMgr:destroyWindow(item)
     queue.items[index] = nil
 
@@ -158,7 +157,7 @@
     end
     for i=queue.first,queue.last-1 do
         local item = queue.items[i]
-        queue.window:removeChildWindow(item)
+        queue.window:removeChild(item)
         winMgr:destroyWindow(item)
     end
     queue.items = {}
@@ -198,7 +197,7 @@
         absoluteHeigth = P.queueHeightHelper(queue, queue.maxSize)
         relativeHeight = 0
     end
-    queueWindow:setSize(CEGUI.UVector2(CEGUI.UDim(relativeWidth, absoluteWidth), CEGUI.UDim(relativeHeight, absoluteHeigth)))
+    queueWindow:setSize(CEGUI.USize(CEGUI.UDim(relativeWidth, absoluteWidth), CEGUI.UDim(relativeHeight, absoluteHeigth)))
 end
 
 -- Change the horizontal alignment of the displayed notifications.
@@ -282,14 +281,14 @@
 end
 
 function P.itemHeightHelper(queue)
-    local item = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/Test/")
+    local item = winMgr:createWindow("MenuWidgets/StaticText", "NotificationLayer/Root/Test/")
     item:setText("text")
     P.setItemFontHelper(item, queue, true)
-    queue.window:addChildWindow(item)
-    item:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0), CEGUI.UDim(1, 0)))
+    queue.window:addChild(item)
+    item:setSize(CEGUI.USize(CEGUI.UDim(1, 0), CEGUI.UDim(1, 0)))
     item:setProperty("FrameEnabled", "false")
     local height = getStaticTextWindowHeight(item)
-    queue.window:removeChildWindow(item)
+    queue.window:removeChild(item)
     winMgr:destroyWindow(item)
     return height
 end

Modified: code/branches/cegui0.8_ogre1.9/data/levels/AnihilationThreat.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/AnihilationThreat.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/AnihilationThreat.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -46,7 +46,7 @@
     position="0.2, 0, 0.1, 0"
     fontSize="23"
     fontColor="0.8, 0.5, 0.2, 0.8"
-    alignment="HorzCentred"
+    alignment="CentreAligned"
     displaySize="0.6, 0, 0, 0"
     />
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/ArrowLevel.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/ArrowLevel.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/ArrowLevel.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -35,7 +35,7 @@
     position="0.2, 0, 0.1, 0"
     fontSize="23"
     fontColor="0.3, 1, 0.2, 0.8"
-    alignment="HorzCentred"
+    alignment="CentreAligned"
     displaySize="0.6, 0, 0, 0"
     />
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/ProtectBoss.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/ProtectBoss.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/ProtectBoss.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -35,7 +35,7 @@
     position="0.2, 0, 0.1, 0"
     fontSize="16"
     fontColor="0.3, 1, 0.2, 0.8"
-    alignment="HorzCentred"
+    alignment="CentreAligned"
     displaySize="0.6, 0, 0, 0"
   />
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/expeditionSector.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/expeditionSector.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/expeditionSector.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -34,7 +34,7 @@
         position="0.15, 0, 0.1, 0"
         fontSize="15"
         fontColor="0.3, 1, 0.2, 0.8"
-        alignment="HorzCentred"
+        alignment="CentreAligned"
         displaySize="0.7, 0, 0, 0"
     />
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/iJohnVane_TriptoArea51.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/iJohnVane_TriptoArea51.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/iJohnVane_TriptoArea51.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -36,7 +36,7 @@
     position="0.2, 0, 0.1, 0"
     fontSize="23"
     fontColor="0.3, 1, 0.2, 0.8"
-    alignment="HorzCentred"
+    alignment="CentreAligned"
     displaySize="0.6, 0, 0, 0"
     />
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/iiJohnVane_Area51UnderFire.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/iiJohnVane_Area51UnderFire.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/iiJohnVane_Area51UnderFire.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -50,7 +50,7 @@
     position="0.2, 0, 0.1, 0"
     fontSize="23"
     fontColor="0.3, 1, 0.2, 0.8"
-    alignment="HorzCentred"
+    alignment="CentreAligned"
     displaySize="0.6, 0, 0, 0"
     />
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/iiiJohnVane_EscapeTheBastards.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/iiiJohnVane_EscapeTheBastards.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/iiiJohnVane_EscapeTheBastards.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -59,7 +59,7 @@
     position="0.2, 0, 0.1, 0"
     fontSize="23"
     fontColor="0.3, 1, 0.2, 0.8"
-    alignment="HorzCentred"
+    alignment="CentreAligned"
     displaySize="0.6, 0, 0, 0"
     />
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/includes/notifications.oxi
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/includes/notifications.oxi	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/includes/notifications.oxi	2018-02-24 00:49:10 UTC (rev 11802)
@@ -15,6 +15,6 @@
     position="0.2, 0, 0.8, 0"
     fontSize="24"
     fontColor="1, 1, 0, 0.8"
-    alignment="HorzCentred"
+    alignment="CentreAligned"
     displaySize="0.6, 0, 0, 0"
 />
\ No newline at end of file

Modified: code/branches/cegui0.8_ogre1.9/data/levels/kecks.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/kecks.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/kecks.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -40,7 +40,7 @@
     position="0.2, 0, 0.1, 0"
     fontSize="23"
     fontColor="0.3, 1, 0.2, 0.8"
-    alignment="HorzCentred"
+    alignment="CentreAligned"
     displaySize="0.6, 0, 0, 0"
     />
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/maxim.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/maxim.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/maxim.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -37,7 +37,7 @@
     position="0.2, 0, 0.1, 0"
     fontSize="23"
     fontColor="0.3, 1, 0.2, 0.8"
-    alignment="HorzCentred"
+    alignment="CentreAligned"
     displaySize="0.6, 0, 0, 0"
     />
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/missionOne.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/missionOne.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/missionOne.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -36,7 +36,7 @@
     position="0.2, 0, 0.1, 0"
     fontSize="23"
     fontColor="0.3, 1, 0.2, 0.8"
-    alignment="HorzCentred"
+    alignment="CentreAligned"
     displaySize="0.6, 0, 0, 0"
     />
   <Scene

Modified: code/branches/cegui0.8_ogre1.9/data/levels/notifications.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/notifications.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/notifications.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -26,7 +26,7 @@
       position="0.2, 0, 0.1, 0"
       fontSize="23"
       fontColor="0.3, 1, 0.2, 0.8"
-      alignment="HorzCentred"
+      alignment="CentreAligned"
       displaySize="0.6, 0, 0, 0"
       />
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/presentationFS11.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/presentationFS11.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/presentationFS11.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -37,7 +37,7 @@
     position="0.2, 0, 0.1, 0"
     fontSize="24"
     fontColor="0.3, 1, 0.2, 0.8"
-    alignment="HorzCentred"
+    alignment="CentreAligned"
     displaySize="0.6, 0, 0, 0"
     />
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/presentationHS11.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/presentationHS11.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/presentationHS11.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -36,7 +36,7 @@
     position="0.2, 0, 0.1, 0"
     fontSize="23"
     fontColor="0.3, 1, 0.2, 0.8"
-    alignment="HorzCentred"
+    alignment="CentreAligned"
     displaySize="0.6, 0, 0, 0"
     />
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/presentationHS12.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/presentationHS12.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/presentationHS12.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -47,7 +47,7 @@
     position="0.2, 0, 0.1, 0"
     fontSize="24"
     fontColor="0.3, 1, 0.2, 0.8"
-    alignment="HorzCentred"
+    alignment="CentreAligned"
     displaySize="0.6, 0, 0, 0"
     />
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/shuttleAttack.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/shuttleAttack.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/shuttleAttack.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -35,7 +35,7 @@
         position="0.15, 0, 0.1, 0"
         fontSize="15"
         fontColor="0.3, 1, 0.2, 0.8"
-        alignment="HorzCentred"
+        alignment="CentreAligned"
         displaySize="0.7, 0, 0, 0"
     />
 

Modified: code/branches/cegui0.8_ogre1.9/data/levels/shuttleRetaliation.oxw
===================================================================
--- code/branches/cegui0.8_ogre1.9/data/levels/shuttleRetaliation.oxw	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/data/levels/shuttleRetaliation.oxw	2018-02-24 00:49:10 UTC (rev 11802)
@@ -34,7 +34,7 @@
         position="0.15, 0, 0.1, 0"
         fontSize="15"
         fontColor="0.3, 1, 0.2, 0.8"
-        alignment="HorzCentred"
+        alignment="CentreAligned"
         displaySize="0.7, 0, 0, 0"
     />
 

Modified: code/branches/cegui0.8_ogre1.9/src/modules/notifications/NotificationManager.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/notifications/NotificationManager.cc	2018-02-24 00:08:11 UTC (rev 11801)
+++ code/branches/cegui0.8_ogre1.9/src/modules/notifications/NotificationManager.cc	2018-02-24 00:49:10 UTC (rev 11802)
@@ -420,7 +420,7 @@
         infoQueue->setPosition(Vector4(0.2, 0, 0.8, 0));
         infoQueue->setFontSize(24);
         infoQueue->setFontColor(Vector4(1.0, 1.0, 0.0, 0.8));
-        infoQueue->setAlignment("HorzCentred");
+        infoQueue->setAlignment("CentreAligned");
         infoQueue->setDisplaySize(Vector2(0.6, 0.0));*/
     }
 



More information about the Orxonox-commit mailing list