- Timestamp:
- Aug 7, 2011, 3:11:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/orxonox/chat/ChatInputHandler.cc
r8828 r8829 44 44 #include "core/input/InputManager.h" 45 45 #include "core/input/InputState.h" 46 #include "network/Host.h" 47 46 47 #include "chat/ChatManager.h" 48 48 #include "PlayerManager.h" 49 49 #include "infos/PlayerInfo.h" … … 213 213 214 214 /* handle incoming chat */ 215 void ChatInputHandler::incomingChat(const std::string& message, 216 unsigned int senderID) 217 { 218 /* look up the actual name of the sender */ 219 std::string text = message; 220 std::string name = ""; 221 222 /* setup player name info */ 223 if (senderID != NETWORK_PEER_ID_UNKNOWN) 224 { 225 PlayerInfo* player = PlayerManager::getInstance().getClient(senderID); 226 if (player) 227 { 228 name = player->getName(); 229 text = name + ": " + message; 230 } 231 } 232 215 void ChatInputHandler::incomingChat(const std::string& message, const std::string& name) 216 { 233 217 /* create item */ 234 CEGUI::ListboxTextItem *toadd = new CEGUI::ListboxTextItem( text);218 CEGUI::ListboxTextItem *toadd = new CEGUI::ListboxTextItem( message ); 235 219 236 220 /* setup colors */ … … 320 304 321 305 /* c) send the chat via some call */ 322 Host::Chat( msgtosend );306 ChatManager::chat( msgtosend ); 323 307 324 308 /* d) stop listening to input - only if this is not fullchat */
Note: See TracChangeset
for help on using the changeset viewer.