summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-22 20:09:45 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-22 20:09:45 +0300
commit2e168e49be41607bd865c97e6667ba1a2db150ed (patch)
tree46552774d163e43871bf76c32d5c75edeff8ddba /src
parent07ecab051e47f2a934acef615294db496520e87c (diff)
downloadmanaverse-2e168e49be41607bd865c97e6667ba1a2db150ed.tar.gz
manaverse-2e168e49be41607bd865c97e6667ba1a2db150ed.tar.bz2
manaverse-2e168e49be41607bd865c97e6667ba1a2db150ed.tar.xz
manaverse-2e168e49be41607bd865c97e6667ba1a2db150ed.zip
Replace particle font to japan font if need.
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index bd855a598..3d79f0cdf 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -105,14 +105,14 @@ Gui::Gui(Graphics *graphics):
Window::setWindowContainer(guiTop);
setTop(guiTop);
+ const std::vector<std::string> langs = getLang();
+ const bool isJapan = (!langs.empty() && langs[0].size() > 3
+ && langs[0].substr(0, 3) == "ja_");
+
// Set global font
const int fontSize = config.getIntValue("fontSize");
-
std::string fontFile = config.getValue("font", "");
-
- std::vector<std::string> langs = getLang();
- if (!langs.empty() && langs[0].size() > 3
- && langs[0].substr(0, 3) == "ja_")
+ if (isJapan)
{
fontFile = config.getValue("japanFont", "");
if (fontFile.empty())
@@ -134,6 +134,15 @@ Gui::Gui(Graphics *graphics):
// Set particle font
fontFile = config.getValue("particleFont", "");
+
+ if (isJapan)
+ {
+ fontFile = config.getValue("japanFont", "");
+ if (fontFile.empty())
+ fontFile = branding.getStringValue("japanFont");
+ }
+
+
if (fontFile.empty())
fontFile = branding.getStringValue("particleFont");