mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Automatically scroll to end on new chat message
This commit is contained in:
@@ -19,9 +19,9 @@
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../gui/WindowHandler.h"
|
||||
#include "../widgets/TextControls.h"
|
||||
#include "../widgets/Slider.h"
|
||||
#include "../widgets/ObjectLists.h"
|
||||
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../../lib/Languages.h"
|
||||
#include "../../lib/MetaString.h"
|
||||
#include "../../lib/TextOperations.h"
|
||||
@@ -139,6 +139,8 @@ void GlobalLobbyWindow::onGameChatMessage(const std::string & sender, const std:
|
||||
void GlobalLobbyWindow::refreshChatText()
|
||||
{
|
||||
widget->getGameChat()->setText(chatHistory);
|
||||
if (widget->getGameChat()->slider)
|
||||
widget->getGameChat()->slider->scrollToMax();
|
||||
}
|
||||
|
||||
bool GlobalLobbyWindow::isChannelUnread(const std::string & channelType, const std::string & channelName) const
|
||||
|
||||
Reference in New Issue
Block a user