1
0
forked from mirrors/0ad

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.
This commit is contained in:
wraitii
2020-12-01 09:42:05 +00:00
parent dcc73561c2
commit f78d3ddf71
11 changed files with 164 additions and 28 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -38,6 +38,7 @@ void CGUI::AddObjectTypes()
{
m_ProxyData.insert(JSI_GUIProxy<IGUIObject>::CreateData(*m_ScriptInterface));
m_ProxyData.insert(JSI_GUIProxy<CText>::CreateData(*m_ScriptInterface));
m_ProxyData.insert(JSI_GUIProxy<CList>::CreateData(*m_ScriptInterface));
AddObjectType("button", &CButton::ConstructObject);
AddObjectType("chart", &CChart::ConstructObject);