summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2009-01-13 00:28:58 +0000
committerDavid Athay <ko2fan@gmail.com>2009-01-13 00:28:58 +0000
commit224da21ea258450fcc78dd7635de84aba1d1df5e (patch)
treedc4df492779986aff60ed785f4821daae968d023 /src/gui/gui.cpp
parentd7a5438d3c7b140c0966243bae98ff447385d246 (diff)
parented60c53eb2fe5ef377fc726df796d0aaf2005c6c (diff)
downloadmana-224da21ea258450fcc78dd7635de84aba1d1df5e.tar.gz
mana-224da21ea258450fcc78dd7635de84aba1d1df5e.tar.bz2
mana-224da21ea258450fcc78dd7635de84aba1d1df5e.tar.xz
mana-224da21ea258450fcc78dd7635de84aba1d1df5e.zip
Merge branch 'master' of git://gitorious.org/tmw/eathena
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 a65cb0fb..87bab0ea 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -24,12 +24,9 @@
#include <guichan/exception.hpp>
#include <guichan/image.hpp>
#include <guichan/imagefont.hpp>
-#include <SDL/SDL_ttf.h>
-
-// Should stay here because of Guichan being sensitive to headers order
-#include <guichan/sdl/sdlinput.hpp>
#include "focushandler.h"
+#include "sdlinput.h"
#include "truetypefont.h"
#include "viewport.h"
#include "window.h"
@@ -48,7 +45,7 @@
// Guichan stuff
Gui *gui;
Viewport *viewport; /**< Viewport on the map. */
-gcn::SDLInput *guiInput; /**< GUI input. */
+SDLInput *guiInput;
// Fonts used in showing hits
gcn::Font *hitRedFont;
@@ -91,7 +88,7 @@ Gui::Gui(Graphics *graphics):
gcn::Image::setImageLoader(&imageLoader);
// Set input
- guiInput = new gcn::SDLInput();
+ guiInput = new SDLInput;
setInput(guiInput);
// Set focus handler
@@ -106,9 +103,12 @@ Gui::Gui(Graphics *graphics):
Window::setWindowContainer(guiTop);
setTop(guiTop);
- // Set global font (based on ISO-8859-15)
+ ResourceManager *resman = ResourceManager::getInstance();
+
+ // Set global font
+ std::string path = resman->getPath("fonts/dejavusans.ttf");
try {
- mGuiFont = new TrueTypeFont("data/fonts/dejavusans.ttf", 12);
+ mGuiFont = new TrueTypeFont(path, 11);
}
catch (gcn::Exception e)
{