summaryrefslogtreecommitdiff
path: root/src/gui/theme.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-21 00:32:40 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-21 00:32:40 +0300
commit593dcda16950ae79ebe97de6a3b49cf7bb5e95f7 (patch)
tree405e2692f991149f087f4fb25dc1ae167b936c6d /src/gui/theme.cpp
parent4a93a8cee81a1e49e17fb51f4e0c9ec51899ddea (diff)
downloadplus-593dcda16950ae79ebe97de6a3b49cf7bb5e95f7.tar.gz
plus-593dcda16950ae79ebe97de6a3b49cf7bb5e95f7.tar.bz2
plus-593dcda16950ae79ebe97de6a3b49cf7bb5e95f7.tar.xz
plus-593dcda16950ae79ebe97de6a3b49cf7bb5e95f7.zip
Add ability to change gui opacity from theme file.
Set opacity for jewelry theme to 1.
Diffstat (limited to 'src/gui/theme.cpp')
-rw-r--r--src/gui/theme.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 999b2ec2b..8f10a9372 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -1226,6 +1226,10 @@ ImageSet *Theme::getImageSetFromThemeXml(const std::string &name,
info->name = atoi(reinterpret_cast<const char*>(\
xmlNodeGetContent(infoNode)))
+#define readFloatValue(name) \
+ info->name = atof(reinterpret_cast<const char*>(\
+ xmlNodeGetContent(infoNode)))
+
ThemeInfo *Theme::loadInfo(const std::string &themeName)
{
std::string path;
@@ -1271,6 +1275,8 @@ ThemeInfo *Theme::loadInfo(const std::string &themeName)
readIntValue(fontSize);
else if (xmlNameEqual(infoNode, "npcfontSize"))
readIntValue(npcfontSize);
+ else if (xmlNameEqual(infoNode, "guialpha"))
+ readFloatValue(guiAlpha);
else if (xmlNameEqual(infoNode, fontSize2.c_str()))
readIntValue(fontSize);
else if (xmlNameEqual(infoNode, npcfontSize2.c_str()))