Changeset 7354 for code/branches/notifications/data/gui/scripts
- Timestamp:
- Sep 5, 2010, 12:42:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/notifications/data/gui/scripts/NotificationLayer.lua
r7351 r7354 6 6 P.nameList = {} 7 7 P.visible = nil 8 P.editMode = false 9 P.editList = {} 8 10 9 11 function P.createQueue(name, size) 10 12 local root = winMgr:getWindow("orxonox/NotificationLayer/Root") 11 13 local queue = winMgr:createWindow("MenuWidgets/Listbox", "orxonox/NotificationLayer/Root/Queue/" .. name) 12 queue:setProperty("BackgroundColor", " 66FFFFFF")14 queue:setProperty("BackgroundColor", "00FFFFFF") 13 15 root:addChildWindow(queue) 14 16 … … 123 125 end 124 126 127 function P.enterEditMode() 128 P.editMode = true 129 130 local root = winMgr:getWindow("orxonox/NotificationLayer/Root") 131 --Replace all queues with FrameWindows 132 for k,v in pairs(P.queueList) do 133 if v ~= nil then 134 root:removeChildWindow(v) 135 local frame = winMgr:createWindow("MenuWidgets/FrameWindow", "orxonox/NotificationLayer/Root/EditMode/" .. P.nameList(k)) 136 frame:setArea(v:getArea()) 137 P.editList[k] = frame 138 end 139 end 140 end 141 142 function P.leaveEditMode() 143 P.editMode = false 144 145 local root = winMgr:getWindow("orxonox/NotificationLayer/Root") 146 --Replace all queues with FrameWindows 147 for k,v in pairs(P.queueList) do 148 if v ~= nil then 149 root:addChildWindow(v) 150 v:setArea(P.editList[k]:getArea()) 151 winMgr:destroyWindow(P.editList[k]) 152 P.editList[k] = nil 153 end 154 end 155 end 156 157 function P.onHide() 158 if P.editMode then 159 P.leaveEditMode() 160 end 161 end 162 125 163 function P.nameToQueueHelper(name) 126 164 local queue = nil
Note: See TracChangeset
for help on using the changeset viewer.