diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-09-12 22:15:35 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-09-12 22:15:35 +0000 |
commit | 8a598e713f504c88402ff204907044c0d62c5f29 (patch) | |
tree | 073bce873520aa438a4cb1dd1e63e206b30200dd /src/gui/gui.cpp | |
parent | d174cc5811eb6450617ca500f9e5cd13f334374a (diff) | |
download | mana-8a598e713f504c88402ff204907044c0d62c5f29.tar.gz mana-8a598e713f504c88402ff204907044c0d62c5f29.tar.bz2 mana-8a598e713f504c88402ff204907044c0d62c5f29.tar.xz mana-8a598e713f504c88402ff204907044c0d62c5f29.zip |
Added SDLImageLoader class to make guichan support physfs.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 1c2b2063..3642b004 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -31,7 +31,6 @@ #include <guichan/opengl/openglimageloader.hpp> #endif -#include <guichan/sdl/sdlimageloader.hpp> #include <guichan/sdl/sdlinput.hpp> #include "focushandler.h" @@ -52,6 +51,7 @@ #include "../resources/image.h" #include "../resources/resourcemanager.h" +#include "../resources/sdlimageloader.h" extern Being* autoTarget; @@ -92,13 +92,13 @@ Gui::Gui(Graphics *graphics): if (config.getValue("opengl", 0)) { // Set image loader - mHostImageLoader = new gcn::SDLImageLoader(); + mHostImageLoader = new SDLImageLoader(); mImageLoader = new gcn::OpenGLImageLoader(mHostImageLoader); } else #endif { // Set image loader - mImageLoader = new gcn::SDLImageLoader(); + mImageLoader = new SDLImageLoader(); } // Set input @@ -120,12 +120,9 @@ Gui::Gui(Graphics *graphics): Window::setWindowContainer(guiTop); setTop(guiTop); - ResourceManager *resman = ResourceManager::getInstance(); - // Set global font try { - mGuiFont = new gcn::ImageFont( - resman->getRealPath("graphics/gui/sansserif8.png"), + mGuiFont = new gcn::ImageFont("graphics/gui/sansserif8.png", " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[" "\\]^_`abcdefghijklmnopqrstuvwxyz{|}~|" ); @@ -137,8 +134,7 @@ Gui::Gui(Graphics *graphics): // Set speech font try { - speechFont = new gcn::ImageFont( - resman->getRealPath("graphics/gui/rpgfont_wider.png"), + speechFont = new gcn::ImageFont("graphics/gui/rpgfont_wider.png", " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789.,!?-+/():;%&`'*#=[]\"<>{}^~|_@&\\" ); @@ -152,14 +148,11 @@ Gui::Gui(Graphics *graphics): // Load hits' colourful fonts try { - hitRedFont = new gcn::ImageFont( - resman->getRealPath("graphics/gui/hits_red.png"), + hitRedFont = new gcn::ImageFont("graphics/gui/hits_red.png", "0123456789"); - hitBlueFont = new gcn::ImageFont( - resman->getRealPath("graphics/gui/hits_blue.png"), + hitBlueFont = new gcn::ImageFont("graphics/gui/hits_blue.png", "0123456789"); - hitYellowFont = new gcn::ImageFont( - resman->getRealPath("graphics/gui/hits_yellow.png"), + hitYellowFont = new gcn::ImageFont("graphics/gui/hits_yellow.png", "mis"); } catch (gcn::Exception e) |