From f78d3ddf71b19180fc91b2ebfe3f3894fc03a594 Mon Sep 17 00:00:00 2001 From: wraitii Date: Tue, 1 Dec 2020 09:42:05 +0000 Subject: [PATCH] Fix Lobby/MP Gamesetup chat lag with many messages. CText requires re-rendering every message when adding a new one, which quickly becomes very slow. Use CList and a custom method to work around this. These classes are in need of a more complete refactoring. Based on a patch by: nani Differential Revision: https://code.wildfiregames.com/D1781 This was SVN commit r24306. --- .../data/mods/public/gui/common/styles.xml | 1 - .../Panels/Chat/ChatMessagesPanel.js | 2 +- .../GameSetupPage/Panels/Chat/ChatPanel.xml | 2 +- .../lobby/LobbyPage/Chat/ChatMessagesPanel.js | 2 +- .../gui/lobby/LobbyPage/Chat/ChatPanel.xml | 2 +- source/gui/GUIObjectTypes.cpp | 3 +- source/gui/ObjectTypes/CList.cpp | 81 ++++++++++++++----- source/gui/ObjectTypes/CList.h | 13 ++- source/gui/ObjectTypes/COList.cpp | 4 +- source/gui/ObjectTypes/CText.cpp | 2 +- source/gui/Scripting/JSInterface_CList.cpp | 80 ++++++++++++++++++ 11 files changed, 164 insertions(+), 28 deletions(-) create mode 100644 source/gui/Scripting/JSInterface_CList.cpp diff --git a/binaries/data/mods/public/gui/common/styles.xml b/binaries/data/mods/public/gui/common/styles.xml index f91b8cca82..547e6f15a3 100644 --- a/binaries/data/mods/public/gui/common/styles.xml +++ b/binaries/data/mods/public/gui/common/styles.xml @@ -102,7 +102,6 @@ scroll_bottom="true" textcolor="white" text_align="left" - text_valign="center" />