summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-06 11:49:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-06 11:49:16 +0300
commit98f057d55df649353cc6500328a45b0dfe6f833e (patch)
tree843de3fdb51ef65f6c372085a87eedb851297af2 /src/gui
parentd38328a5986f17e0e9f6183869ac446c040e4722 (diff)
downloadmanaverse-98f057d55df649353cc6500328a45b0dfe6f833e.tar.gz
manaverse-98f057d55df649353cc6500328a45b0dfe6f833e.tar.bz2
manaverse-98f057d55df649353cc6500328a45b0dfe6f833e.tar.xz
manaverse-98f057d55df649353cc6500328a45b0dfe6f833e.zip
add missing auto switch font to japanese or chinese for npc font.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 3fe0443ca..f84750e17 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -155,7 +155,6 @@ void Gui::postInit(Graphics *const graphics)
if (fontFile.empty())
fontFile = branding.getStringValue("chinaFont");
}
-
if (fontFile.empty())
fontFile = branding.getStringValue("font");
@@ -169,9 +168,9 @@ void Gui::postInit(Graphics *const graphics)
.append("': ").append(e.getMessage()));
}
+
// Set particle font
fontFile = config.getValue("particleFont", "");
-
if (isJapan)
{
fontFile = config.getValue("japanFont", "");
@@ -184,8 +183,6 @@ void Gui::postInit(Graphics *const graphics)
if (fontFile.empty())
fontFile = branding.getStringValue("chinaFont");
}
-
-
if (fontFile.empty())
fontFile = branding.getStringValue("particleFont");
@@ -200,6 +197,7 @@ void Gui::postInit(Graphics *const graphics)
.append("': ").append(e.getMessage()));
}
+
// Set bold font
fontFile = config.getValue("boldFont", "");
if (fontFile.empty())
@@ -215,6 +213,7 @@ void Gui::postInit(Graphics *const graphics)
.append("': ").append(e.getMessage()));
}
+
// Set help font
fontFile = config.getValue("helpFont", "");
if (fontFile.empty())
@@ -230,6 +229,7 @@ void Gui::postInit(Graphics *const graphics)
.append("': ").append(e.getMessage()));
}
+
// Set secure font
fontFile = config.getValue("secureFont", "");
if (fontFile.empty())
@@ -245,9 +245,22 @@ void Gui::postInit(Graphics *const graphics)
.append("': ").append(e.getMessage()));
}
+
// Set npc font
- fontFile = config.getValue("npcFont", "");
const int npcFontSize = config.getIntValue("npcfontSize");
+ fontFile = config.getValue("npcFont", "");
+ if (isJapan)
+ {
+ fontFile = config.getValue("japanFont", "");
+ if (fontFile.empty())
+ fontFile = branding.getStringValue("japanFont");
+ }
+ else if(isChinese)
+ {
+ fontFile = config.getValue("chinaFont", "");
+ if (fontFile.empty())
+ fontFile = branding.getStringValue("chinaFont");
+ }
if (fontFile.empty())
fontFile = branding.getStringValue("npcFont");