summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui.cpp47
-rw-r--r--src/gui/gui.h8
2 files changed, 55 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
diff --git a/src/gui/gui.h b/src/gui/gui.h
index d2a832c7..f250a8e3 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -119,4 +119,12 @@ extern gcn::Font *hitYellowFont;
*/
extern gcn::Font *speechFont;
+/**
+ * being name fonts
+ */
+extern gcn::Font *npcNameFont;
+extern gcn::Font *mobNameFont;
+extern gcn::Font *gmNameFont;
+
+
#endif