summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-01-24 19:43:26 +0100
committerIra Rice <irarice@gmail.com>2009-01-24 14:55:38 -0700
commit581206ab0fecbb3afc7afebedac541be51097cf5 (patch)
tree9734beffe9a54f02abe3457bb4c546a0bb878036 /src/gui/gui.cpp
parentc4fd3e6090fb94a77055f4556d906e60e3803d22 (diff)
downloadmana-581206ab0fecbb3afc7afebedac541be51097cf5.tar.gz
mana-581206ab0fecbb3afc7afebedac541be51097cf5.tar.bz2
mana-581206ab0fecbb3afc7afebedac541be51097cf5.tar.xz
mana-581206ab0fecbb3afc7afebedac541be51097cf5.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/gui.cpp')
-rw-r--r--src/gui/gui.cpp67
1 files changed, 6 insertions, 61 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 99883151..5314b9ba 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -42,14 +42,14 @@
#include "../resources/resourcemanager.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;
+gcn::Font *hitRedFont = 0;
+gcn::Font *hitBlueFont = 0;
+gcn::Font *hitYellowFont = 0;
// Font used to display speech and player names
gcn::Font *speechFont;
@@ -122,60 +122,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());
- }
-
- // Set npc name font
- try {
- npcNameFont = new gcn::ImageFont("graphics/gui/rpgfont_wider-blue.png",
- " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "0123456789.,!?-+/():;%&`'*#=[]\"<>{}^~|_@$\\"
- "áÁéÉíÍóÓúÚç륣¢¡¿àãõêñÑöüäÖÜÄßøèÈåÅ"
- );
- }
- catch (gcn::Exception e)
- {
- logger->error("Unable to load rpgfont_wider-blue.png!");
- }
-
- // Set monster name font
- try {
- mobNameFont = new gcn::ImageFont("graphics/gui/rpgfont_wider-orange.png",
- " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "0123456789.,!?-+/():;%&`'*#=[]\"<>{}^~|_@$\\"
- "áÁéÉíÍóÓúÚç륣¢¡¿àãõêñÑöüäÖÜÄßøèÈåÅ"
- );
- }
- catch (gcn::Exception e)
- {
- logger->error("Unable to load rpgfont_wider-orange.png!");
- }
-
- // Set GM name font
- try {
- gmNameFont = new gcn::ImageFont("graphics/gui/rpgfont_wider-green.png",
- " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "0123456789.,!?-+/():;%&`'*#=[]\"<>{}^~|_@$\\"
- "áÁéÉíÍóÓúÚç륣¢¡¿àãõêñÑöüäÖÜÄßøèÈåÅ"
- );
- }
- catch (gcn::Exception e)
- {
- logger->error("Unable to load rpgfont_wider-green.png!");
- }
-
-
gcn::Widget::setGlobalFont(mGuiFont);
// Load hits' colourful fonts
@@ -219,7 +165,6 @@ Gui::~Gui()
mMouseCursors->decRef();
delete mGuiFont;
- delete speechFont;
delete viewport;
delete getTop();