Changeset 8377
- Timestamp:
- May 2, 2011, 1:33:24 PM (14 years ago)
- Location:
- code/branches/tutoriallevel2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutoriallevel2/data/gui/scripts/NotificationLayer.lua
r8371 r8377 31 31 ["visible"] = false, 32 32 ["fontSize"] = 12, 33 ["fontColor"] = " #FFFFFFFF",33 ["fontColor"] = "FFFFFFFF", 34 34 ["items"] = {}, 35 35 ["first"] = 1, … … 196 196 197 197 -- Change the font size and font color of all notifications in a queueHeightHelper 198 -- The parameters are (in order) 'name of the queue', 'font size', ' RGBAof the font color in hex notation'.198 -- The parameters are (in order) 'name of the queue', 'font size', 'ARGB of the font color in hex notation'. 199 199 function P.changeQueueFont(queueName, size, color) 200 200 local queue = P.queueList[queueName] … … 227 227 end 228 228 if changeColor then 229 --item:setProperty("TextColours", "tl:[" .. queue.fontColor .. "] tr:[" .. queue.fontColor .. "] bl:[" .. queue.fontColor .. "] br:[" .. queue.fontColor .. "]") 229 item:setProperty("TextColours", "tl:" .. queue.fontColor .. " tr:" .. queue.fontColor .. " bl:" .. queue.fontColor .. " br:" .. queue.fontColor .. "") 230 cout(0, "tl:[" .. queue.fontColor .. "] tr:[" .. queue.fontColor .. "] bl:[" .. queue.fontColor .. "] br:[" .. queue.fontColor .. "]") 230 231 end 231 232 end -
code/branches/tutoriallevel2/src/modules/notifications/NotificationDispatcher.cc
r8374 r8377 113 113 { 114 114 const std::string message = this->createNotificationMessage(); 115 NotificationListener::sendNotification(message, clientId, this->getSender());115 NotificationListener::sendNotification(message, this->getSender(), notificationMessageMode::message, notificationSendMode::network, clientId); 116 116 } 117 117 else if(GameMode::isServer()) -
code/branches/tutoriallevel2/src/modules/questsystem/QuestDescription.cc
r8374 r8377 119 119 } 120 120 121 NotificationListener::sendNotification(message, player->getClientID(), QuestDescription::SENDER);121 NotificationListener::sendNotification(message, QuestDescription::SENDER, notificationMessageMode::message, notificationSendMode::network, player->getClientID()); 122 122 return true; 123 123 } -
code/branches/tutoriallevel2/src/orxonox/interfaces/NotificationListener.h
r8374 r8377 48 48 namespace orxonox 49 49 { 50 class Notification; 50 51 namespace notificationMessageMode 52 { 53 enum Value { 54 message, 55 command 56 }; 57 } 58 59 namespace notificationSendMode 60 { 61 enum Value { 62 local, 63 network, 64 broadcast 65 }; 66 } 51 67 52 68 /** … … 71 87 static const std::string NONE; //!< Static string to indicare a sender that sends to no specific NotificationListener. 72 88 73 static void sendNotification(const std::string& message, unsigned int clientId, const std::string& sender = NotificationListener::NONE, bool isLocal = false); 89 static void sendNotification(const std::string& message, const std::string& sender = NotificationListener::NONE, notificationMessageMode::Value messageMode = notificationMessageMode::message, notificationSendMode::Value sendMode = notificationSendMode::local, unsigned int clientId = 0); 90 static void sendNotificationHelper(const std::string& message, const std::string& sender, unsigned int messageMode); 74 91 75 92 virtual bool registerNotification(const std::string& message, const std::string& sender) 76 93 { return false; } 94 virtual void executeCommand(const std::string& command, const std::string& sender) {} 77 95 }; 78 96 }
Note: See TracChangeset
for help on using the changeset viewer.