summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/chatwindow.cpp1
-rw-r--r--src/gui/gui.cpp16
-rw-r--r--src/gui/gui.h2
3 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index c900da9e8..59da87d37 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -290,6 +290,7 @@ void ChatWindow::fillCommands()
mCommands.push_back("/closeall");
mCommands.push_back("/clear");
mCommands.push_back("/cleangraphics");
+ mCommands.push_back("/cleanfonts");
mCommands.push_back("/create ");
mCommands.push_back("/close");
mCommands.push_back("/cacheinfo");
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 205bdff5a..a6e222183 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -310,6 +310,22 @@ void Gui::slowLogic()
BLOCK_END("Gui::slowLogic")
}
+void Gui::clearFonts()
+{
+ if (mGuiFont)
+ mGuiFont->clear();
+ if (mInfoParticleFont)
+ mInfoParticleFont->clear();
+ if (mHelpFont)
+ mHelpFont->clear();
+ if (mSecureFont)
+ mSecureFont->clear();
+ if (boldFont)
+ boldFont->clear();
+ if (mNpcFont)
+ mNpcFont->clear();
+}
+
bool Gui::handleInput()
{
BLOCK_START("Gui::handleInput")
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 983b34dc0..84142f3e1 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -75,6 +75,8 @@ class Gui final : public gcn::Gui
void slowLogic();
+ void clearFonts();
+
/**
* Draws the whole Gui by calling draw functions down in the
* Gui hierarchy. It also draws the mouse pointer.