[guilib] GUIWindow: added new <depth> tag which define on how window will be "in...
authorAnton Fedchin <afedchin@ruswizards.com>
Fri, 14 Aug 2015 15:36:30 +0000 (18:36 +0300)
committerAnton Fedchin <afedchin@ruswizards.com>
Fri, 28 Aug 2015 07:58:29 +0000 (10:58 +0300)
xbmc/guilib/GUIWindow.cpp

index 2520c22..d4de7a7 100644 (file)
@@ -253,6 +253,11 @@ bool CGUIWindow::Load(TiXmlElement* pRootElement)
       pChild->QueryFloatAttribute("y", &m_camera.y);
       m_hasCamera = true;
     }
+    else if (strValue == "depth" && pChild->FirstChild())
+    { 
+      float stereo = (float)atof(pChild->FirstChild()->Value());;
+      m_stereo = std::max(-1.f, std::min(1.f, stereo));
+    }
     else if (strValue == "controls")
     {
       TiXmlElement *pControl = pChild->FirstChildElement();
@@ -1005,6 +1010,7 @@ void CGUIWindow::SetDefaults()
   m_animations.clear();
   m_origins.clear();
   m_hasCamera = false;
+  m_stereo = 0.f;
   m_animationsEnabled = true;
   m_clearBackground = 0xff000000; // opaque black -> clear
   m_hitRect.SetRect(0, 0, (float)m_coordsRes.iWidth, (float)m_coordsRes.iHeight);