[Orxonox-commit 2657] r7362 - in code/branches/notifications: data/gui/scripts src/modules/notifications

dafrick at orxonox.net dafrick at orxonox.net
Sun Sep 5 23:11:22 CEST 2010


Author: dafrick
Date: 2010-09-05 23:11:22 +0200 (Sun, 05 Sep 2010)
New Revision: 7362

Modified:
   code/branches/notifications/data/gui/scripts/NotificationLayer.lua
   code/branches/notifications/src/modules/notifications/NotificationManager.cc
Log:
NotificationQueue can now be moved in edit mode.


Modified: code/branches/notifications/data/gui/scripts/NotificationLayer.lua
===================================================================
--- code/branches/notifications/data/gui/scripts/NotificationLayer.lua	2010-09-05 20:51:55 UTC (rev 7361)
+++ code/branches/notifications/data/gui/scripts/NotificationLayer.lua	2010-09-05 21:11:22 UTC (rev 7362)
@@ -132,8 +132,9 @@
     for k,v in pairs(P.queueList) do
         if v ~= nil then
             root:removeChildWindow(v)
-            local frame = winMgr:createWindow("MenuWidgets/FrameWindow", "orxonox/NotificationLayer/Root/EditMode/" .. P.nameList(k))
+            local frame = winMgr:createWindow("MenuWidgets/FrameWindow", "orxonox/NotificationLayer/Root/EditMode/" .. P.nameList[k])
             frame:setArea(v:getArea())
+            root:addChildWindow(frame)
             P.editList[k] = frame
         end
     end
@@ -152,6 +153,8 @@
             P.editList[k] = nil
         end
     end
+
+    showMenuSheet(P.name, false, true)
 end
 
 function P.onHide()

Modified: code/branches/notifications/src/modules/notifications/NotificationManager.cc
===================================================================
--- code/branches/notifications/src/modules/notifications/NotificationManager.cc	2010-09-05 20:51:55 UTC (rev 7361)
+++ code/branches/notifications/src/modules/notifications/NotificationManager.cc	2010-09-05 21:11:22 UTC (rev 7362)
@@ -63,6 +63,8 @@
 
         this->highestIndex_ = 0;
 
+        ModifyConsoleCommand("enterEditMode").setObject(this);
+
         if(GameMode::showsGraphics())
         {
             GUIManager::getInstance().loadGUI("NotificationLayer");
@@ -78,7 +80,7 @@
     */
     NotificationManager::~NotificationManager()
     {
-        
+        ModifyConsoleCommand("enterEditMode").setObject(NULL);
     }
 
     void NotificationManager::preDestroy(void)
@@ -309,6 +311,8 @@
 
     void NotificationManager::enterEditMode(void)
     {
+        GUIManager::getInstance().hideGUI("NotificationLayer");
+        GUIManager::getInstance().showGUI("NotificationLayer", false, false);
         GUIManager::getInstance().getLuaState()->doString("NotificationLayer.enterEditMode()");
     }
 




More information about the Orxonox-commit mailing list