From b05628214d64e579504c87da72e79c024245a631 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 1 May 2005 22:00:40 +0000 Subject: Catch exception to put some message through to the user. --- src/gui/gui.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/gui') diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index c9f7e571..97423af6 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -64,10 +64,18 @@ Gui::Gui(Graphics *graphics): setTop(guiTop); // Set global font - guiFont = new gcn::ImageFont(TMW_DATADIR "data/graphics/gui/fixedfont.png", - " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:@" - "!\"$%&/=?^+*#[]{}()<>_;'.,\\|-~`" - ); + try { + guiFont = new gcn::ImageFont( + TMW_DATADIR "data/graphics/gui/fixedfont.png", + " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567" + "89:@!\"$%&/=?^+*#[]{}()<>_;'.,\\|-~`" + ); + } + catch (gcn::Exception e) + { + logger.error("Unable to load fixedfont.png!"); + } + gcn::Widget::setGlobalFont(guiFont); } -- cgit v1.2.3-70-g09d2