Changeset 7351 for code/branches/notifications/data
- Timestamp:
- Sep 4, 2010, 5:56:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/notifications/data/gui/scripts/NotificationLayer.lua
r7349 r7351 5 5 P.queueList = {} 6 6 P.nameList = {} 7 P.visible = nil 7 8 8 9 function P.createQueue(name, size) 9 10 local root = winMgr:getWindow("orxonox/NotificationLayer/Root") 10 11 local queue = winMgr:createWindow("MenuWidgets/Listbox", "orxonox/NotificationLayer/Root/Queue/" .. name) 11 queue:setProperty("BackgroundColor", " 00FFFFFF")12 queue:setProperty("BackgroundColor", "66FFFFFF") 12 13 root:addChildWindow(queue) 13 14 14 15 queue:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0))) 15 16 queue:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, 0), CEGUI.UDim(0, P.queueHeightHelper(queue, size)))) 17 18 P.setVisible(queue, false) 16 19 17 20 table.insert(P.queueList, queue) … … 50 53 listbox:insertItem(item, listbox:getListboxItemFromIndex(0)) 51 54 end 55 56 if P.visible == false then 57 P.setVisible(queue, true) 58 end 52 59 end 53 60 … … 60 67 local listbox = CEGUI.toListbox(queue) 61 68 listbox:removeItem(listbox:getListboxItemFromIndex(listbox:getItemCount()-1)) 69 70 if listbox:getItemCount() == 0 then 71 P.setVisible(queue, false) 72 end 62 73 end 63 74 … … 70 81 local listbox = CEGUI.toListbox(queue) 71 82 listbox:removeItem(listbox:getListboxItemFromIndex(tonumber(index))) 83 84 if listbox:getItemCount() == 0 then 85 P.setVisible(queue, false) 86 end 72 87 end 73 88 … … 80 95 local listbox = CEGUI.toListbox(queue) 81 96 CEGUI.toListbox(queue):resetList() 97 98 P.setVisible(queue, false) 82 99 end 83 100 … … 99 116 end 100 117 queue:setHeight(CEGUI.UDim(0, P.queueHeightHelper(queue, size))) 118 end 119 120 function P.setVisible(queue, visible) 121 queue:setVisible(visible) 122 P.visible = visible 101 123 end 102 124
Note: See TracChangeset
for help on using the changeset viewer.