aboutsummaryrefslogtreecommitdiff
path: root/guilib
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2010-04-07 03:33:10 +0000
committerjmarshallnz <jmarshallnz@svn>2010-04-07 03:33:10 +0000
commit6d5d4a969e1fe086c717f8dc13e96516fe7d9308 (patch)
tree6d63b0cfb1c6b5bcc237ba2002db42a0b4111b17 /guilib
parent19c76587059f0bf32edbe054143bb998173214cc (diff)
added: <debugging>true</debugging> flag to skin.xml allowing skin debugging information on screen.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@29100 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib')
-rw-r--r--guilib/SkinInfo.cpp21
-rw-r--r--guilib/SkinInfo.h7
2 files changed, 20 insertions, 8 deletions
diff --git a/guilib/SkinInfo.cpp b/guilib/SkinInfo.cpp
index 7b800a1454..7222cf10ff 100644
--- a/guilib/SkinInfo.cpp
+++ b/guilib/SkinInfo.cpp
@@ -39,24 +39,28 @@ CSkinInfo g_SkinInfo; // global
CSkinInfo::CSkinInfo()
{
- m_DefaultResolution = RES_PAL_4x3;
- m_DefaultResolutionWide = RES_INVALID;
- m_strBaseDir = "";
- m_effectsSlowDown = 1.0f;
- m_onlyAnimateToHome = true;
- m_Version = 1.0;
+ SetDefaults();
}
CSkinInfo::~CSkinInfo()
{}
-void CSkinInfo::Load(const CStdString& strSkinDir, bool loadIncludes)
+void CSkinInfo::SetDefaults()
{
- m_strBaseDir = strSkinDir;
+ m_strBaseDir = "";
m_DefaultResolution = RES_PAL_4x3;
m_DefaultResolutionWide = RES_INVALID;
m_effectsSlowDown = 1.0f;
m_Version = 1.0;
+ m_debugging = false;
+ m_onlyAnimateToHome = true;
+}
+
+void CSkinInfo::Load(const CStdString& strSkinDir, bool loadIncludes)
+{
+ SetDefaults();
+ m_strBaseDir = strSkinDir;
+
// Load from skin.xml
TiXmlDocument xmlDoc;
CStdString strFile = m_strBaseDir + "\\skin.xml";
@@ -74,6 +78,7 @@ void CSkinInfo::Load(const CStdString& strSkinDir, bool loadIncludes)
XMLUtils::GetDouble(root, "version", m_Version);
XMLUtils::GetFloat(root, "effectslowdown", m_effectsSlowDown);
+ XMLUtils::GetBoolean(root, "debugging", m_debugging);
// now load the startupwindow information
LoadStartupWindows(root->FirstChildElement("startupwindows"));
diff --git a/guilib/SkinInfo.h b/guilib/SkinInfo.h
index a6dee65c0e..6ed47c47b3 100644
--- a/guilib/SkinInfo.h
+++ b/guilib/SkinInfo.h
@@ -65,6 +65,11 @@ public:
CStdString GetBaseDir() const;
double GetVersion() const { return m_Version; };
+ /*! \brief Return whether skin debugging is enabled
+ \return true if skin debugging (set via <debugging>true</debugging> in skin.xml) is enabled.
+ */
+ bool IsDebugging() const { return m_debugging; };
+
/*! \brief Get the id of the first window to load
The first window is generally Startup.xml unless it doesn't exist or if the skinner
has specified which start windows they support and the user is going to somewhere other
@@ -108,6 +113,7 @@ protected:
*/
bool GetResolution(const TiXmlNode *node, const char *tag, RESOLUTION &res) const;
+ void SetDefaults();
void LoadIncludes();
bool LoadStartupWindows(const TiXmlElement *startup);
@@ -121,6 +127,7 @@ protected:
std::vector<CStartupWindow> m_startupWindows;
bool m_onlyAnimateToHome;
+ bool m_debugging;
};
extern CSkinInfo g_SkinInfo;