mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Colored chat working as expected for both freetype and non-freetype builds. @nerzhul improvements * Add unit tests * Fix coding style * move guiChatConsole.hpp to client/
This commit is contained in:
parent
0e44af9f70
commit
1d40385d4a
13 changed files with 998 additions and 28 deletions
14
src/game.cpp
14
src/game.cpp
|
@ -34,7 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "log.h"
|
||||
#include "filesys.h"
|
||||
#include "gettext.h"
|
||||
#include "guiChatConsole.h"
|
||||
#include "client/guiChatConsole.h"
|
||||
#include "guiFormSpecMenu.h"
|
||||
#include "guiKeyChangeMenu.h"
|
||||
#include "guiPasswordChange.h"
|
||||
|
@ -59,6 +59,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "minimap.h"
|
||||
#include "mapblock_mesh.h"
|
||||
|
||||
#if USE_FREETYPE
|
||||
#include "util/statictext.h"
|
||||
#endif
|
||||
|
||||
#include "sound.h"
|
||||
|
||||
#if USE_SOUND
|
||||
|
@ -2239,12 +2243,20 @@ bool Game::initGui()
|
|||
false, false, guiroot);
|
||||
guitext_status->setVisible(false);
|
||||
|
||||
#if USE_FREETYPE
|
||||
// Colored chat support when using FreeType
|
||||
guitext_chat = new gui::StaticText(L"", false, guienv, guiroot, -1, core::rect<s32>(0, 0, 0, 0), false);
|
||||
guitext_chat->setWordWrap(true);
|
||||
guitext_chat->drop();
|
||||
#else
|
||||
// Standard chat when FreeType is disabled
|
||||
// Chat text
|
||||
guitext_chat = guienv->addStaticText(
|
||||
L"",
|
||||
core::rect<s32>(0, 0, 0, 0),
|
||||
//false, false); // Disable word wrap as of now
|
||||
false, true, guiroot);
|
||||
#endif
|
||||
// Remove stale "recent" chat messages from previous connections
|
||||
chat_backend->clearRecentChat();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue