diff options
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 7cf1881c..6a399548 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -22,7 +22,6 @@ #include <guichan/exception.hpp> #include <guichan/image.hpp> #include <guichan/imagefont.hpp> -#include <SDL/SDL_ttf.h> #include "focushandler.h" #include "gui.h" @@ -45,7 +44,7 @@ // Guichan stuff Gui *gui; Viewport *viewport; /**< Viewport on the map. */ -SDLInput *guiInput; /**< GUI input. */ +SDLInput *guiInput; // Fonts used in showing hits gcn::Font *hitRedFont; @@ -110,20 +109,17 @@ Gui::Gui(Graphics *graphics): Window::setWindowContainer(guiTop); setTop(guiTop); + ResourceManager *resman = ResourceManager::getInstance(); + // Set global font + std::string path = resman->getPath("fonts/dejavusans.ttf"); try { - mGuiFont = new TrueTypeFont("/usr/local/share/aethyra/data/fonts/dejavusans.ttf", 10); + mGuiFont = new TrueTypeFont(path, 11); } catch (gcn::Exception e) { - try { - mGuiFont = new TrueTypeFont("data/fonts/dejavusans.ttf", 10); - } - catch (gcn::Exception e) - { logger->error(std::string("Unable to load dejavusans.ttf: ") + e.getMessage()); - } } // Set speech font |