diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-24 19:43:26 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-24 19:43:26 +0100 |
commit | a928798a9326de1e6781e14c8ccf5abec1232385 (patch) | |
tree | 2e0f82055cab1bddf85102d5161a3262637879ee /src/gui | |
parent | 944c187b91e823075dd1708b4f575acd43f0428f (diff) | |
download | mana-a928798a9326de1e6781e14c8ccf5abec1232385.tar.gz mana-a928798a9326de1e6781e14c8ccf5abec1232385.tar.bz2 mana-a928798a9326de1e6781e14c8ccf5abec1232385.tar.xz mana-a928798a9326de1e6781e14c8ccf5abec1232385.zip |
Use standard GUI font also for speech and names
The speech bitmap font can't handle unicode, so it has now been replaced
by the standard GUI font, drawn with a shadow for chat and with a full
outline for names.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui.cpp | 29 | ||||
-rw-r--r-- | src/gui/gui.h | 4 | ||||
-rw-r--r-- | src/gui/ministatus.cpp | 8 |
3 files changed, 6 insertions, 35 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 722779ca..22d94791 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -43,16 +43,14 @@ #include "../resources/imageloader.h" // Guichan stuff -Gui *gui; -Viewport *viewport; /**< Viewport on the map. */ -SDLInput *guiInput; +Gui *gui = 0; +Viewport *viewport = 0; /**< Viewport on the map. */ +SDLInput *guiInput = 0; // Fonts used in showing hits -gcn::Font *hitRedFont; -gcn::Font *hitBlueFont; -gcn::Font *hitYellowFont; -// Font used to display speech and player names -gcn::Font *speechFont; +gcn::Font *hitRedFont = 0; +gcn::Font *hitBlueFont = 0; +gcn::Font *hitYellowFont = 0; class GuiConfigListener : public ConfigListener { @@ -116,20 +114,6 @@ Gui::Gui(Graphics *graphics): + e.getMessage()); } - // Set speech font - try { - speechFont = new gcn::ImageFont("graphics/gui/rpgfont_wider.png", - " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" - "0123456789.,!?-+/():;%&`'*#=[]\"<>{}^~|_@$\\" - "áÁéÉíÍóÓúÚç륣¢¡¿àãõêñÑöüäÖÜÄßøèÈåÅ" - ); - } - catch (gcn::Exception e) - { - logger->error(std::string("Unable to load rpgfont_wider.png: ") - + e.getMessage()); - } - gcn::Widget::setGlobalFont(mGuiFont); // Load hits' colourful fonts @@ -173,7 +157,6 @@ Gui::~Gui() mMouseCursors->decRef(); delete mGuiFont; - delete speechFont; delete viewport; delete getTop(); diff --git a/src/gui/gui.h b/src/gui/gui.h index 6af0a26a..c153b8e1 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -124,9 +124,5 @@ extern SDLInput *guiInput; /**< GUI input */ extern gcn::Font *hitRedFont; extern gcn::Font *hitBlueFont; extern gcn::Font *hitYellowFont; -/** - * Font used to display speech and player names - */ -extern gcn::Font *speechFont; #endif diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp index 7a10ed3f..fa4f75da 100644 --- a/src/gui/ministatus.cpp +++ b/src/gui/ministatus.cpp @@ -55,14 +55,6 @@ MiniStatusWindow::MiniStatusWindow(): mMpLabel->setDimension(mMpBar->getDimension()); mXpLabel->setDimension(mXpBar->getDimension()); - mHpLabel->setForegroundColor(gcn::Color(255, 255, 255)); - mMpLabel->setForegroundColor(gcn::Color(255, 255, 255)); - mXpLabel->setForegroundColor(gcn::Color(255, 255, 255)); - - mHpLabel->setFont(speechFont); - mMpLabel->setFont(speechFont); - mXpLabel->setFont(speechFont); - mHpLabel->setAlignment(gcn::Graphics::CENTER); mMpLabel->setAlignment(gcn::Graphics::CENTER); mXpLabel->setAlignment(gcn::Graphics::CENTER); |