MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / receiveChat

Method receiveChat

source/modes/GameEditorModeBase.cpp:204–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204void 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
218void GameEditorModeBase::receiveEventShortNotice(EventMessage* event)
219{

Callers 1

processMessageMethod · 0.45

Calls 1

getMessageAsStringMethod · 0.80

Tested by

no test coverage detected