Changeset 11802
- Timestamp:
- Feb 24, 2018, 1:49:10 AM (7 years ago)
- Location:
- code/branches/cegui0.8_ogre1.9
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cegui0.8_ogre1.9/data/gui/scripts/NotificationLayer.lua
r8858 r11802 10 10 function P.onLoad() 11 11 orxonox.NotificationManager:getInstance():loadQueues() 12 P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", " orxonox/NotificationLayer/Root/SampleWindow")12 P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "NotificationLayer/Root/SampleWindow") 13 13 end 14 14 15 15 -- Creates a queue in the GUI. 16 16 function P.createQueue(name, size) 17 local root = winMgr:getWindow("orxonox/NotificationLayer/Root")18 17 --local queue = winMgr:createWindow("MenuWidgets/Listbox", "orxonox/NotificationLayer/Root/Queue/" .. name) 19 18 --queue:setProperty("BackgroundColor", "00FFFFFF") -- Set background to be fully transparent. 20 local queue = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/NotificationLayer/Root/Queue/" ..name)19 local queue = winMgr:createWindow("MenuWidgets/ScrollablePane", name) 21 20 queue:setProperty("Alpha", 0.0) 22 21 --queue:setProperty("FrameEnabled", "false") 23 root:addChildWindow(queue)22 P.window:addChild(queue) 24 23 25 24 local queueTuple = … … 38 37 39 38 queue:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0))) 40 queue:setSize(CEGUI.U Vector2(CEGUI.UDim(1.0, 0), CEGUI.UDim(0, P.queueHeightHelper(queueTuple, size))))39 queue:setSize(CEGUI.USize(CEGUI.UDim(1.0, 0), CEGUI.UDim(0, P.queueHeightHelper(queueTuple, size)))) 41 40 42 41 P.queueList[name] = queueTuple -- name access … … 49 48 50 49 if queue ~= nil then 51 queue.window:getParent():removeChild Window(queue.window)50 queue.window:getParent():removeChild(queue.window) 52 51 winMgr:destroyWindow(queue.window) 53 52 end … … 66 65 end 67 66 68 local item = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/Queue/" .. queueName .. "/" ..queue.last)67 local item = winMgr:createWindow("MenuWidgets/StaticText", queue.last) 69 68 item:setText(notification) 70 69 P.setItemFontHelper(item, queue, true) … … 77 76 end 78 77 end 79 queue.window:addChild Window(item)80 item:setSize(CEGUI.U Vector2(CEGUI.UDim(1, 0), CEGUI.UDim(0, itemHeight)))78 queue.window:addChild(item) 79 item:setSize(CEGUI.USize(CEGUI.UDim(1, 0), CEGUI.UDim(0, itemHeight))) 81 80 item:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0))) 82 81 item:setProperty("Alpha", 1.0) … … 102 101 local item = queue.items[queue.first] 103 102 -- Removes the item from the bottom of the queue. 104 queue.window:removeChild Window(item)103 queue.window:removeChild(item) 105 104 winMgr:destroyWindow(item) 106 105 queue.first = queue.first+1 … … 127 126 -- Removes the item. 128 127 local item = queue.items[index] 129 queue.window:removeChild Window(item)128 queue.window:removeChild(item) 130 129 winMgr:destroyWindow(item) 131 130 queue.items[index] = nil … … 159 158 for i=queue.first,queue.last-1 do 160 159 local item = queue.items[i] 161 queue.window:removeChild Window(item)160 queue.window:removeChild(item) 162 161 winMgr:destroyWindow(item) 163 162 end … … 199 198 relativeHeight = 0 200 199 end 201 queueWindow:setSize(CEGUI.U Vector2(CEGUI.UDim(relativeWidth, absoluteWidth), CEGUI.UDim(relativeHeight, absoluteHeigth)))200 queueWindow:setSize(CEGUI.USize(CEGUI.UDim(relativeWidth, absoluteWidth), CEGUI.UDim(relativeHeight, absoluteHeigth))) 202 201 end 203 202 … … 283 282 284 283 function P.itemHeightHelper(queue) 285 local item = winMgr:createWindow("MenuWidgets/StaticText", " orxonox/NotificationLayer/Root/Test/")284 local item = winMgr:createWindow("MenuWidgets/StaticText", "NotificationLayer/Root/Test/") 286 285 item:setText("text") 287 286 P.setItemFontHelper(item, queue, true) 288 queue.window:addChild Window(item)289 item:setSize(CEGUI.U Vector2(CEGUI.UDim(1, 0), CEGUI.UDim(1, 0)))287 queue.window:addChild(item) 288 item:setSize(CEGUI.USize(CEGUI.UDim(1, 0), CEGUI.UDim(1, 0))) 290 289 item:setProperty("FrameEnabled", "false") 291 290 local height = getStaticTextWindowHeight(item) 292 queue.window:removeChild Window(item)291 queue.window:removeChild(item) 293 292 winMgr:destroyWindow(item) 294 293 return height -
code/branches/cegui0.8_ogre1.9/data/levels/AnihilationThreat.oxw
r10262 r11802 47 47 fontSize="23" 48 48 fontColor="0.8, 0.5, 0.2, 0.8" 49 alignment=" HorzCentred"49 alignment="CentreAligned" 50 50 displaySize="0.6, 0, 0, 0" 51 51 /> -
code/branches/cegui0.8_ogre1.9/data/levels/ArrowLevel.oxw
r11783 r11802 36 36 fontSize="23" 37 37 fontColor="0.3, 1, 0.2, 0.8" 38 alignment=" HorzCentred"38 alignment="CentreAligned" 39 39 displaySize="0.6, 0, 0, 0" 40 40 /> -
code/branches/cegui0.8_ogre1.9/data/levels/ProtectBoss.oxw
r11783 r11802 36 36 fontSize="16" 37 37 fontColor="0.3, 1, 0.2, 0.8" 38 alignment=" HorzCentred"38 alignment="CentreAligned" 39 39 displaySize="0.6, 0, 0, 0" 40 40 /> -
code/branches/cegui0.8_ogre1.9/data/levels/expeditionSector.oxw
r11795 r11802 35 35 fontSize="15" 36 36 fontColor="0.3, 1, 0.2, 0.8" 37 alignment=" HorzCentred"37 alignment="CentreAligned" 38 38 displaySize="0.7, 0, 0, 0" 39 39 /> -
code/branches/cegui0.8_ogre1.9/data/levels/iJohnVane_TriptoArea51.oxw
r11052 r11802 37 37 fontSize="23" 38 38 fontColor="0.3, 1, 0.2, 0.8" 39 alignment=" HorzCentred"39 alignment="CentreAligned" 40 40 displaySize="0.6, 0, 0, 0" 41 41 /> -
code/branches/cegui0.8_ogre1.9/data/levels/iiJohnVane_Area51UnderFire.oxw
r11795 r11802 51 51 fontSize="23" 52 52 fontColor="0.3, 1, 0.2, 0.8" 53 alignment=" HorzCentred"53 alignment="CentreAligned" 54 54 displaySize="0.6, 0, 0, 0" 55 55 /> -
code/branches/cegui0.8_ogre1.9/data/levels/iiiJohnVane_EscapeTheBastards.oxw
r11795 r11802 60 60 fontSize="23" 61 61 fontColor="0.3, 1, 0.2, 0.8" 62 alignment=" HorzCentred"62 alignment="CentreAligned" 63 63 displaySize="0.6, 0, 0, 0" 64 64 /> -
code/branches/cegui0.8_ogre1.9/data/levels/includes/notifications.oxi
r8706 r11802 16 16 fontSize="24" 17 17 fontColor="1, 1, 0, 0.8" 18 alignment=" HorzCentred"18 alignment="CentreAligned" 19 19 displaySize="0.6, 0, 0, 0" 20 20 /> -
code/branches/cegui0.8_ogre1.9/data/levels/kecks.oxw
r11795 r11802 41 41 fontSize="23" 42 42 fontColor="0.3, 1, 0.2, 0.8" 43 alignment=" HorzCentred"43 alignment="CentreAligned" 44 44 displaySize="0.6, 0, 0, 0" 45 45 /> -
code/branches/cegui0.8_ogre1.9/data/levels/maxim.oxw
r9939 r11802 38 38 fontSize="23" 39 39 fontColor="0.3, 1, 0.2, 0.8" 40 alignment=" HorzCentred"40 alignment="CentreAligned" 41 41 displaySize="0.6, 0, 0, 0" 42 42 /> -
code/branches/cegui0.8_ogre1.9/data/levels/missionOne.oxw
r11795 r11802 37 37 fontSize="23" 38 38 fontColor="0.3, 1, 0.2, 0.8" 39 alignment=" HorzCentred"39 alignment="CentreAligned" 40 40 displaySize="0.6, 0, 0, 0" 41 41 /> -
code/branches/cegui0.8_ogre1.9/data/levels/notifications.oxw
r11052 r11802 27 27 fontSize="23" 28 28 fontColor="0.3, 1, 0.2, 0.8" 29 alignment=" HorzCentred"29 alignment="CentreAligned" 30 30 displaySize="0.6, 0, 0, 0" 31 31 /> -
code/branches/cegui0.8_ogre1.9/data/levels/presentationFS11.oxw
r11795 r11802 38 38 fontSize="24" 39 39 fontColor="0.3, 1, 0.2, 0.8" 40 alignment=" HorzCentred"40 alignment="CentreAligned" 41 41 displaySize="0.6, 0, 0, 0" 42 42 /> -
code/branches/cegui0.8_ogre1.9/data/levels/presentationHS11.oxw
r9348 r11802 37 37 fontSize="23" 38 38 fontColor="0.3, 1, 0.2, 0.8" 39 alignment=" HorzCentred"39 alignment="CentreAligned" 40 40 displaySize="0.6, 0, 0, 0" 41 41 /> -
code/branches/cegui0.8_ogre1.9/data/levels/presentationHS12.oxw
r11795 r11802 48 48 fontSize="24" 49 49 fontColor="0.3, 1, 0.2, 0.8" 50 alignment=" HorzCentred"50 alignment="CentreAligned" 51 51 displaySize="0.6, 0, 0, 0" 52 52 /> -
code/branches/cegui0.8_ogre1.9/data/levels/shuttleAttack.oxw
r11795 r11802 36 36 fontSize="15" 37 37 fontColor="0.3, 1, 0.2, 0.8" 38 alignment=" HorzCentred"38 alignment="CentreAligned" 39 39 displaySize="0.7, 0, 0, 0" 40 40 /> -
code/branches/cegui0.8_ogre1.9/data/levels/shuttleRetaliation.oxw
r11795 r11802 35 35 fontSize="15" 36 36 fontColor="0.3, 1, 0.2, 0.8" 37 alignment=" HorzCentred"37 alignment="CentreAligned" 38 38 displaySize="0.7, 0, 0, 0" 39 39 /> -
code/branches/cegui0.8_ogre1.9/src/modules/notifications/NotificationManager.cc
r11071 r11802 421 421 infoQueue->setFontSize(24); 422 422 infoQueue->setFontColor(Vector4(1.0, 1.0, 0.0, 0.8)); 423 infoQueue->setAlignment(" HorzCentred");423 infoQueue->setAlignment("CentreAligned"); 424 424 infoQueue->setDisplaySize(Vector2(0.6, 0.0));*/ 425 425 }
Note: See TracChangeset
for help on using the changeset viewer.