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 | |
parent | 6eff1c9069aaa5a470ade9370964bd4de81f3d41 (diff) | |
download | mana-6458dc08c6345664c4ccfa467f8a43d78a257467.tar.gz mana-6458dc08c6345664c4ccfa467f8a43d78a257467.tar.bz2 mana-6458dc08c6345664c4ccfa467f8a43d78a257467.tar.xz mana-6458dc08c6345664c4ccfa467f8a43d78a257467.zip |
Commiting again
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui.cpp | 27 | ||||
-rw-r--r-- | src/gui/gui.h | 7 |
2 files changed, 34 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; diff --git a/src/gui/gui.h b/src/gui/gui.h index daaaa905..42334ca1 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -89,4 +89,11 @@ extern WindowContainer *guiTop; /**< The top container */ extern Graphics *guiGraphics; /**< Graphics driver */ extern gcn::SDLInput *guiInput; /**< GUI input */ +/** + * Fonts used in showing hits + */ +extern gcn::ImageFont *hitRedFont; +extern gcn::ImageFont *hitBlueFont; +extern gcn::ImageFont *hitYellowFont; + #endif |