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

Method receiveChat

source/modes/MenuModeConfigureSeats.cpp:575–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573}
574
575void MenuModeConfigureSeats::receiveChat(const ChatMessage& chat)
576{
577 CEGUI::Window* playersWin = getModeManager().getGui().getGuiSheet(Gui::guiSheet::configureSeats)->getChild("ListPlayers");
578 // Adds the message right away
579 CEGUI::Window* chatWin = playersWin->getChild("GameChatText");
580 chatWin->appendText(reinterpret_cast<const CEGUI::utf8*>(chat.getMessageAsString().c_str()));
581
582 // Ensure the latest text is shown
583 CEGUI::Scrollbar* scrollBar = reinterpret_cast<CEGUI::Scrollbar*>(chatWin->getChild("__auto_vscrollbar__"));
584 scrollBar->setScrollPosition(scrollBar->getDocumentSize());
585}
586
587bool MenuModeConfigureSeats::chatText(const CEGUI::EventArgs& e)
588{

Callers

nothing calls this directly

Calls 2

getGuiSheetMethod · 0.80
getMessageAsStringMethod · 0.80

Tested by

no test coverage detected