summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorRodney Dawes <dobey@novell.com>2005-07-09 19:58:36 +0000
committerRodney Dawes <dobey@novell.com>2005-07-09 19:58:36 +0000
commit0afaba4f311960be968a76bc07b28c24f4480579 (patch)
tree35ede37998c252594a2bd3affec5c1e1b217a1a6 /src/gui/gui.cpp
parentd1d9fe1f259c40f567104a8714a9e3532cde1e90 (diff)
downloadmana-client-0afaba4f311960be968a76bc07b28c24f4480579.tar.gz
mana-client-0afaba4f311960be968a76bc07b28c24f4480579.tar.bz2
mana-client-0afaba4f311960be968a76bc07b28c24f4480579.tar.xz
mana-client-0afaba4f311960be968a76bc07b28c24f4480579.zip
Add fallbacks for the font image loading code so that running tmw without doing
make install can work again
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 83682ad3..f38bb1b4 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -89,7 +89,17 @@ Gui::Gui(Graphics *graphics)
}
catch (gcn::Exception e)
{
+ try {
+ guiFont = new gcn::ImageFont(
+ "data/graphics/gui/fixedfont.png",
+ " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567"
+ "89:@!\"$%&/=?^+*#[]{}()<>_;'.,\\|-~`ψε"
+ );
+ }
+ catch (gcn::Exception e)
+ {
logger->error("Unable to load fixedfont.png!");
+ }
}
gcn::Widget::setGlobalFont(guiFont);
@@ -108,7 +118,21 @@ Gui::Gui(Graphics *graphics)
}
catch (gcn::Exception e)
{
+ try {
+ hitRedFont = new gcn::ImageFont(
+ "data/graphics/gui/hits_red.png",
+ "0123456789");
+ hitBlueFont = new gcn::ImageFont(
+ "data/graphics/gui/hits_blue.png",
+ "0123456789");
+ hitYellowFont = new gcn::ImageFont(
+ "data/graphics/gui/hits_yellow.png",
+ "mis");
+ }
+ catch (gcn::Exception e)
+ {
logger->error("Unable to load colored hits' fonts!");
+ }
}
}