diff options
author | jmarshallnz <jmarshallnz@svn> | 2010-07-17 05:49:29 +0000 |
---|---|---|
committer | jmarshallnz <jmarshallnz@svn> | 2010-07-17 05:49:29 +0000 |
commit | fb534a4d27e3bff701a55d9b07058dea64f4a9b3 (patch) | |
tree | 14fc4b112c43b0529d55529a4e04d92a476f580d | |
parent | abf376f43231ae8b37ce99ae3485d82df7141d5d (diff) |
fixed: Ensure GetRenderPosition() returns something sensible for dialogs with origin other than (0,0)
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@31891 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | guilib/GUIControl.cpp | 2 | ||||
-rw-r--r-- | guilib/GUIControl.h | 6 | ||||
-rw-r--r-- | guilib/GUIControlGroup.h | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/guilib/GUIControl.cpp b/guilib/GUIControl.cpp index e1924f4922..7a47cb48f0 100644 --- a/guilib/GUIControl.cpp +++ b/guilib/GUIControl.cpp @@ -887,7 +887,7 @@ void CGUIControl::ExecuteActions(const vector<CGUIActionDescriptor> &actions) CPoint CGUIControl::GetRenderPosition() const { float z = 0; - CPoint point(GetXPosition(), GetYPosition()); + CPoint point(GetPosition()); m_transform.TransformPosition(point.x, point.y, z); if (m_parentControl) point += m_parentControl->GetRenderPosition(); diff --git a/guilib/GUIControl.h b/guilib/GUIControl.h index 72466930d9..cd335cc7f8 100644 --- a/guilib/GUIControl.h +++ b/guilib/GUIControl.h @@ -261,6 +261,12 @@ public: virtual void DumpTextureUse() {}; #endif protected: + /*! + \brief Return the coordinates of the top left of the control, in the control's parent coordinates + \return The top left coordinates of the control + */ + virtual CPoint GetPosition() const { return CPoint(GetXPosition(), GetYPosition()); }; + /*! \brief Called when the mouse is over the control. Default implementation selects the control. \param point location of the mouse in transformed skin coordinates diff --git a/guilib/GUIControlGroup.h b/guilib/GUIControlGroup.h index 6b9f331468..162e806fdf 100644 --- a/guilib/GUIControlGroup.h +++ b/guilib/GUIControlGroup.h @@ -89,12 +89,6 @@ public: #endif protected: /*! - \brief Return the coordinates of the top left of the group, in the group's parent coordinates - \return The top left coordinates of the group - */ - virtual CPoint GetPosition() const { return CPoint(m_posX, m_posY); }; - - /*! \brief Check whether a given control is valid Runs through controls and returns whether this control is valid. Only functional for controls with non-zero id. |