summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-16 22:17:22 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-16 22:17:22 +0300
commit6e6c5b2ba399e0ed364ada843c4c759ee54de219 (patch)
tree562e6a840c856ba8c4d35c6806020289c65d54d2 /src/gui/gui.cpp
parent82ac4641828ec7387863bb18cf4493190c4cc68f (diff)
downloadmv-6e6c5b2ba399e0ed364ada843c4c759ee54de219.tar.gz
mv-6e6c5b2ba399e0ed364ada843c4c759ee54de219.tar.bz2
mv-6e6c5b2ba399e0ed364ada843c4c759ee54de219.tar.xz
mv-6e6c5b2ba399e0ed364ada843c4c759ee54de219.zip
combine font classes in one.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 08794d478..f549727a4 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -25,8 +25,8 @@
#include "gui/gui.h"
#include "gui/focushandler.h"
+#include "gui/font.h"
#include "gui/palette.h"
-#include "gui/sdlfont.h"
#include "gui/sdlinput.h"
#include "gui/theme.h"
#include "gui/viewport.h"
@@ -60,7 +60,7 @@ Gui *gui = nullptr;
SDLInput *guiInput = nullptr;
// Bolded font
-SDLFont *boldFont = nullptr;
+Font *boldFont = nullptr;
class GuiConfigListener final : public ConfigListener
{
@@ -160,7 +160,7 @@ void Gui::postInit(Graphics *const graphics)
if (fontFile.empty())
fontFile = branding.getStringValue("font");
- mGuiFont = new SDLFont(fontFile, fontSize);
+ mGuiFont = new Font(fontFile, fontSize);
// Set particle font
fontFile = config.getValue("particleFont", "");
@@ -179,28 +179,28 @@ void Gui::postInit(Graphics *const graphics)
if (fontFile.empty())
fontFile = branding.getStringValue("particleFont");
- mInfoParticleFont = new SDLFont(fontFile, fontSize, TTF_STYLE_BOLD);
+ mInfoParticleFont = new Font(fontFile, fontSize, TTF_STYLE_BOLD);
// Set bold font
fontFile = config.getValue("boldFont", "");
if (fontFile.empty())
fontFile = branding.getStringValue("boldFont");
- boldFont = new SDLFont(fontFile, fontSize);
+ boldFont = new Font(fontFile, fontSize);
// Set help font
fontFile = config.getValue("helpFont", "");
if (fontFile.empty())
fontFile = branding.getStringValue("helpFont");
- mHelpFont = new SDLFont(fontFile, fontSize);
+ mHelpFont = new Font(fontFile, fontSize);
// Set secure font
fontFile = config.getValue("secureFont", "");
if (fontFile.empty())
fontFile = branding.getStringValue("secureFont");
- mSecureFont = new SDLFont(fontFile, fontSize);
+ mSecureFont = new Font(fontFile, fontSize);
// Set npc font
const int npcFontSize = config.getIntValue("npcfontSize");
@@ -220,7 +220,7 @@ void Gui::postInit(Graphics *const graphics)
if (fontFile.empty())
fontFile = branding.getStringValue("npcFont");
- mNpcFont = new SDLFont(fontFile, npcFontSize);
+ mNpcFont = new Font(fontFile, npcFontSize);
gcn::Widget::setGlobalFont(mGuiFont);