Changeset 2435 for code/branches/presentation/src/orxonox/overlays/notifications/NotificationManager.cc
- Timestamp:
- Dec 14, 2008, 1:42:17 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/overlays/notifications/NotificationManager.cc
r2385 r2435 36 36 #include "NotificationQueue.h" 37 37 38 namespace orxonox {39 38 namespace orxonox 39 { 40 40 std::list<NotificationContainer*> NotificationManager::notifications_s; 41 41 … … 55 55 56 56 for (std::list<NotificationContainer*>::iterator notification = notifications_s.begin(); notification != notifications_s.end(); ++notification) 57 57 { 58 58 NotificationContainer* container = *notification; 59 59 if(container->remainingTime == 0) 60 60 { 61 61 continue; 62 63 64 65 66 67 68 69 62 } 63 else if(container->remainingTime - dt <= 0) 64 { 65 container->remainingTime = 0; 66 update = true; 67 } 68 else 69 { 70 70 container->remainingTime = container->remainingTime -dt; 71 72 73 74 71 } 72 } 73 74 if(update) 75 75 updateQueue(); 76 76 } … … 81 81 return false; 82 82 83 84 85 83 NotificationContainer* container = new NotificationContainer; 84 container->notification = notification; 85 container->remainingTime = notification->getDisplayTime(); 86 86 notifications_s.push_front(container); 87 87 … … 105 105 continue; 106 106 107 107 text = text + "\n\n\n------------\n\n" + clipMessage(container->notification->getTitle()) + "\n\n" + clipMessage(container->notification->getMessage()); 108 108 } 109 109
Note: See TracChangeset
for help on using the changeset viewer.