summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-04-18 15:23:49 +0000
committerDavid Athay <ko2fan@gmail.com>2008-04-18 15:23:49 +0000
commit4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76 (patch)
tree831d9d2e909dabab0ee2c6ed640e290ee28ad294 /src/gui/gui.cpp
parent0b567928c0a24c7346451b59285ce8144ae0bf2e (diff)
downloadmana-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.tar.gz
mana-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.tar.bz2
mana-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.tar.xz
mana-4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76.zip
Fixed numerous crashes with chat and guild windows using new tabbed area.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 2ef7aba3..db0d1905 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -107,24 +107,20 @@ Gui::Gui(Graphics *graphics):
Window::setWindowContainer(guiTop);
setTop(guiTop);
+ ResourceManager *resman = ResourceManager::getInstance();
+
// Set global font
- try {
- mGuiFont = new TrueTypeFont("data/fonts/dejavusans.ttf", 11);
- }
- catch (gcn::Exception e)
+ std::string path = resman->getPath("fonts/dejavusans.ttf");
+ if (path != "")
{
- logger->error(std::string("Unable to load dejavusans.ttf: ") + e.getMessage());
+ mGuiFont = new TrueTypeFont(path.c_str(), 11);
}
// Set speech font
- try
- {
- // FIXME: use another font?
- speechFont = new TrueTypeFont("data/fonts/dejavusans.ttf", 11);
- }
- catch (gcn::Exception e)
+ path = resman->getPath("fonts/dejavusans.ttf");
+ if (path != "")
{
- logger->error(std::string("Unable to load dejavusans.ttf: ") + e.getMessage());
+ speechFont = new TrueTypeFont(path.c_str(), 11);
}
gcn::Widget::setGlobalFont(mGuiFont);