diff options
author | José Ávila <linux@javila.net> | 2005-07-03 08:35:50 +0000 |
---|---|---|
committer | José Ávila <linux@javila.net> | 2005-07-03 08:35:50 +0000 |
commit | 6458dc08c6345664c4ccfa467f8a43d78a257467 (patch) | |
tree | 10c46440fae6f60caa715b5cc9dca5aa043cc9da /src/gui/gui.cpp | |
parent | 6eff1c9069aaa5a470ade9370964bd4de81f3d41 (diff) | |
download | mana-client-6458dc08c6345664c4ccfa467f8a43d78a257467.tar.gz mana-client-6458dc08c6345664c4ccfa467f8a43d78a257467.tar.bz2 mana-client-6458dc08c6345664c4ccfa467f8a43d78a257467.tar.xz mana-client-6458dc08c6345664c4ccfa467f8a43d78a257467.zip |
Commiting again
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index cbfd81b4..35b3c843 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -36,6 +36,11 @@ Graphics *guiGraphics; // Graphics driver gcn::SDLInput *guiInput; // GUI input WindowContainer *guiTop; // The top container +// Fonts used in showing hits +gcn::ImageFont *hitRedFont; +gcn::ImageFont *hitBlueFont; +gcn::ImageFont *hitYellowFont; + Gui::Gui(Graphics *graphics) { // Set graphics @@ -87,11 +92,33 @@ Gui::Gui(Graphics *graphics) logger->error("Unable to load fixedfont.png!"); } + // Set hits' colourful fonts + try { + hitRedFont = new gcn::ImageFont( + TMW_DATADIR "data/graphics/gui/hits_red.png", + "0123456789"); + hitBlueFont = new gcn::ImageFont( + TMW_DATADIR "data/graphics/gui/hits_blue.png", + "0123456789"); + hitYellowFont = new gcn::ImageFont( + TMW_DATADIR "data/graphics/gui/hits_yellow.png", + "mis"); + } + catch (gcn::Exception e) + { + logger->error("Unable to load colored hits' fonts!"); + } + gcn::Widget::setGlobalFont(guiFont); } Gui::~Gui() { + // Fonts used in showing hits + delete hitRedFont; + delete hitBlueFont; + delete hitYellowFont; + delete guiFont; delete guiTop; delete imageLoader; |