Преглед на файлове

Automatically scroll to end on new chat message

Ivan Savenko преди 1 година
родител
ревизия
793a17f95d
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      client/globalLobby/GlobalLobbyWindow.cpp

+ 3 - 1
client/globalLobby/GlobalLobbyWindow.cpp

@@ -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