aboutsummaryrefslogtreecommitdiff
path: root/src/gui/guiChatConsole.cpp
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2022-05-17 22:12:00 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2022-05-17 22:12:00 +0200
commit21df26984da91143c15587f5a03c98d68c3adc4e (patch)
treeaaa707a628ad331f67890023dffe1b4f60dd01d3 /src/gui/guiChatConsole.cpp
parentb09fc5de5cdb021f43ad32b7e3f50dc75c0bc622 (diff)
parenteabf05758e3ba5f6f4bb1b8d1d1f02179b84e410 (diff)
downloaddragonfireclient-21df26984da91143c15587f5a03c98d68c3adc4e.tar.xz
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'src/gui/guiChatConsole.cpp')
-rw-r--r--src/gui/guiChatConsole.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/gui/guiChatConsole.cpp b/src/gui/guiChatConsole.cpp
index 0610c85cc..01e10ea2e 100644
--- a/src/gui/guiChatConsole.cpp
+++ b/src/gui/guiChatConsole.cpp
@@ -30,12 +30,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "client/fontengine.h"
#include "log.h"
#include "gettext.h"
+#include "irrlicht_changes/CGUITTFont.h"
#include <string>
-#if USE_FREETYPE
- #include "irrlicht_changes/CGUITTFont.h"
-#endif
-
inline u32 clamp_u8(s32 value)
{
return (u32) MYMIN(MYMAX(value, 0), 255);
@@ -328,19 +325,16 @@ void GUIChatConsole::drawText()
core::rect<s32> destrect(
x, y, x + m_fontsize.X * fragment.text.size(), y + m_fontsize.Y);
-#if USE_FREETYPE
if (m_font->getType() == irr::gui::EGFT_CUSTOM) {
- // Draw colored text if FreeType is enabled
- irr::gui::CGUITTFont *tmp = dynamic_cast<irr::gui::CGUITTFont *>(m_font);
+ // Draw colored text if possible
+ gui::CGUITTFont *tmp = static_cast<gui::CGUITTFont*>(m_font);
tmp->draw(
fragment.text,
destrect,
false,
false,
&AbsoluteClippingRect);
- } else
-#endif
- {
+ } else {
// Otherwise use standard text
m_font->draw(
fragment.text.c_str(),