Changeset 7486 for code/trunk/src/modules/notifications
- Timestamp:
- Sep 23, 2010, 11:54:16 PM (14 years ago)
- Location:
- code/trunk/src/modules/notifications
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/notifications/Notification.h
r7484 r7486 40 40 #include <string> 41 41 #include "core/BaseObject.h" 42 #include "network/synchronisable/Synchronisable.h"43 42 44 43 namespace orxonox -
code/trunk/src/modules/notifications/NotificationManager.cc
r7484 r7486 116 116 @param sender 117 117 The sender that sent the notification. 118 */ 119 /*static*/ void NotificationManager::sendNotification(const std::string& message, unsigned int clientId, const std::string& sender) 118 @param isLocal 119 If this is set to true (false is default), then the Notification is sent to the client where this function is executed, meaning the Notification is sent locally. 120 */ 121 /*static*/ void NotificationManager::sendNotification(const std::string& message, unsigned int clientId, const std::string& sender, bool isLocal) 120 122 { 121 123 // If we're in standalone mode or we're already no the right client we create and send the Notification. 122 if(GameMode::isStandalone() || Host::getPlayerID() == clientId)124 if(GameMode::isStandalone() || isLocal || Host::getPlayerID() == clientId) 123 125 { 124 126 Notification* notification = new Notification(message); -
code/trunk/src/modules/notifications/NotificationManager.h
r7484 r7486 76 76 77 77 //! Sends a Notification with the specified message to the specified client from the specified sender. 78 static void sendNotification(const std::string& message, unsigned int clientId, const std::string& sender = NotificationManager::NONE );78 static void sendNotification(const std::string& message, unsigned int clientId, const std::string& sender = NotificationManager::NONE, bool isLocal = false); 79 79 80 80 bool registerNotification(Notification* notification); //!< Registers a Notification within the NotificationManager. -
code/trunk/src/modules/notifications/NotificationQueue.h
r7484 r7486 58 58 }; 59 59 60 //! Struct to allow ordering of NotificationContainers.60 //! Struct to allow ordering of @ref orxonox::NotificationContainer "NotificationContainers". 61 61 struct NotificationContainerCompare { 62 62 bool operator() (const NotificationContainer* const & a, const NotificationContainer* const & b) const … … 73 73 - 'size': The size of the NotificationQueue, it specifies how many @ref orxonox::Notification "Notifications" are displayed at once at the most. 74 74 - 'displayTime': The time a @ref orxonox::Notification "Notification" is displayed with this NotificationQueue. 75 75 76 @author 76 77 Damian 'Mozork' Frick
Note: See TracChangeset
for help on using the changeset viewer.