aboutsummaryrefslogtreecommitdiff
path: root/guilib/GUIWindow.cpp
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2010-01-09 02:43:17 +0000
committerjmarshallnz <jmarshallnz@svn>2010-01-09 02:43:17 +0000
commit103d00f809fc9bc83421c4ebb171314fd1c35198 (patch)
tree4f90994da4a2f4f9411b72436f568978c4696e18 /guilib/GUIWindow.cpp
parentcd1ff654231dd3016703b22d05c1ffc76d4c655c (diff)
refactor: Removed duplicate/unnecessary code now that controlgroups and windows are more aligned code-wise.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@26567 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUIWindow.cpp')
-rw-r--r--guilib/GUIWindow.cpp28
1 files changed, 4 insertions, 24 deletions
diff --git a/guilib/GUIWindow.cpp b/guilib/GUIWindow.cpp
index 047f14b2c8..cfe25dd881 100644
--- a/guilib/GUIWindow.cpp
+++ b/guilib/GUIWindow.cpp
@@ -314,33 +314,17 @@ void CGUIWindow::Render()
g_graphicsContext.SetRenderingResolution(m_coordsRes, m_needsScaling);
- unsigned int currentTime = CTimeUtils::GetFrameTime();
+ m_renderTime = CTimeUtils::GetFrameTime();
// render our window animation - returns false if it needs to stop rendering
- if (!RenderAnimation(currentTime))
+ if (!RenderAnimation(m_renderTime))
return;
if (m_hasCamera)
g_graphicsContext.SetCameraPosition(m_camera);
- // find our origin point
- CPoint pos(GetPosition());
- g_graphicsContext.SetOrigin(pos.x, pos.y);
+ CGUIControlGroup::Render();
- for (iControls i = m_children.begin(); i != m_children.end(); ++i)
- {
- CGUIControl *pControl = *i;
- if (pControl)
- {
- GUIPROFILER_VISIBILITY_BEGIN(pControl);
- pControl->UpdateVisibility();
- GUIPROFILER_VISIBILITY_END(pControl);
- pControl->DoRender(currentTime);
- }
- }
if (CGUIControlProfiler::IsRunning()) CGUIControlProfiler::Instance().EndFrame();
-
- g_graphicsContext.RestoreOrigin();
- m_hasRendered = true;
}
void CGUIWindow::Close(bool forceClose)
@@ -393,12 +377,8 @@ bool CGUIWindow::OnMouseAction()
}
// run through the controls, and unfocus all those that aren't under the pointer,
- for (iControls i = m_children.begin(); i != m_children.end(); ++i)
- {
- CGUIControl *pControl = *i;
- pControl->UnfocusFromPoint(mousePoint);
- }
// and find which ones are under the pointer
+ UnfocusFromPoint(mousePoint);
vector< pair<CGUIControl *, CPoint> > controls;
GetControlsFromPoint(mousePoint, controls);