summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorLloyd Bryant <lloyd_bryant@netzero.net>2008-08-13 15:02:59 +0000
committerLloyd Bryant <lloyd_bryant@netzero.net>2008-08-13 15:02:59 +0000
commit94024e2b57b31ee92bb81fc48ce236283330b60c (patch)
treea526015cfcdd33c3482b710dc4fa22bbec4e0090 /src/gui/gui.cpp
parentc9175a4d140f4c852aa5195b72ad9bd1ae8d5cee (diff)
downloadmana-94024e2b57b31ee92bb81fc48ce236283330b60c.tar.gz
mana-94024e2b57b31ee92bb81fc48ce236283330b60c.tar.bz2
mana-94024e2b57b31ee92bb81fc48ce236283330b60c.tar.xz
mana-94024e2b57b31ee92bb81fc48ce236283330b60c.zip
Added support for different colored fonts for different being types
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index e56afc76..edc25152 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -56,6 +56,13 @@ gcn::Font *hitYellowFont;
// Font used to display speech and player names
gcn::Font *speechFont;
+// Font for displaying NPC names
+gcn::Font *npcNameFont;
+// Font for displaying mob names
+gcn::Font *mobNameFont;
+// Font for displaying GM names
+gcn::Font *gmNameFont;
+
class GuiConfigListener : public ConfigListener
{
public:
@@ -128,6 +135,46 @@ Gui::Gui(Graphics *graphics):
logger->error("Unable to load rpgfont_wider.png!");
}
+ // 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