From 0afaba4f311960be968a76bc07b28c24f4480579 Mon Sep 17 00:00:00 2001 From: Rodney Dawes Date: Sat, 9 Jul 2005 19:58:36 +0000 Subject: Add fallbacks for the font image loading code so that running tmw without doing make install can work again --- src/gui/gui.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src') 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!"); + } } } -- cgit v1.2.3-70-g09d2