| 202 | } |
| 203 | |
| 204 | void GameEditorModeBase::receiveChat(const ChatMessage& chat) |
| 205 | { |
| 206 | // Adds the message right away |
| 207 | CEGUI::Window* chatTextBox = mRootWindow->getChild("GameChatWindow/GameChatText"); |
| 208 | chatTextBox->appendText(reinterpret_cast<const CEGUI::utf8*>(chat.getMessageAsString().c_str())); |
| 209 | mChatMessageDisplayTime = CHAT_TIME_DISPLAY; |
| 210 | mChatMessageBoxDisplay |= ChatMessageBoxDisplay::showMessageReceived; |
| 211 | refreshChatDisplay(); |
| 212 | |
| 213 | // Ensure the latest text is shown |
| 214 | CEGUI::Scrollbar* scrollBar = reinterpret_cast<CEGUI::Scrollbar*>(chatTextBox->getChild("__auto_vscrollbar__")); |
| 215 | scrollBar->setScrollPosition(scrollBar->getDocumentSize()); |
| 216 | } |
| 217 | |
| 218 | void GameEditorModeBase::receiveEventShortNotice(EventMessage* event) |
| 219 | { |
no test coverage detected