From 593dcda16950ae79ebe97de6a3b49cf7bb5e95f7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 21 May 2013 00:32:40 +0300 Subject: Add ability to change gui opacity from theme file. Set opacity for jewelry theme to 1. --- src/gui/theme.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui/theme.cpp') 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(\ xmlNodeGetContent(infoNode))) +#define readFloatValue(name) \ + info->name = atof(reinterpret_cast(\ + 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())) -- cgit v1.2.3-70-g09d2