aboutsummaryrefslogtreecommitdiff
path: root/guilib/GUIBaseContainer.cpp
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2010-11-17 23:34:01 +0000
committerjmarshallnz <jmarshallnz@svn>2010-11-17 23:34:01 +0000
commit7c373d4f7e5e5c2b724b31af47cece6e97cd373f (patch)
tree05e992127fe4a2cd8252e2dab81c47102fe1e9fd /guilib/GUIBaseContainer.cpp
parent1d3a7c0079c550842ce6f7d8e6aebde043629314 (diff)
cosmetic: indenting
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@35308 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUIBaseContainer.cpp')
-rw-r--r--guilib/GUIBaseContainer.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/guilib/GUIBaseContainer.cpp b/guilib/GUIBaseContainer.cpp
index 086f3bf88f..9548444090 100644
--- a/guilib/GUIBaseContainer.cpp
+++ b/guilib/GUIBaseContainer.cpp
@@ -87,58 +87,58 @@ void CGUIBaseContainer::Render()
if (g_graphicsContext.SetClipRegion(m_posX, m_posY, m_width, m_height))
{
- CPoint origin = CPoint(m_posX, m_posY) + m_renderOffset;
- float pos = (m_orientation == VERTICAL) ? origin.y : origin.x;
- float end = (m_orientation == VERTICAL) ? m_posY + m_height : m_posX + m_width;
-
- // we offset our draw position to take into account scrolling and whether or not our focused
- // item is offscreen "above" the list.
- float drawOffset = (offset - cacheBefore) * m_layout->Size(m_orientation) - m_scrollOffset;
- if (m_offset + m_cursor < offset)
- drawOffset += m_focusedLayout->Size(m_orientation) - m_layout->Size(m_orientation);
- pos += drawOffset;
- end += cacheAfter * m_layout->Size(m_orientation);
-
- float focusedPos = 0;
- CGUIListItemPtr focusedItem;
- int current = offset - cacheBefore;
- while (pos < end && m_items.size())
- {
- int itemNo = CorrectOffset(current, 0);
- if (itemNo >= (int)m_items.size())
- break;
- bool focused = (current == m_offset + m_cursor);
- if (itemNo >= 0)
+ CPoint origin = CPoint(m_posX, m_posY) + m_renderOffset;
+ float pos = (m_orientation == VERTICAL) ? origin.y : origin.x;
+ float end = (m_orientation == VERTICAL) ? m_posY + m_height : m_posX + m_width;
+
+ // we offset our draw position to take into account scrolling and whether or not our focused
+ // item is offscreen "above" the list.
+ float drawOffset = (offset - cacheBefore) * m_layout->Size(m_orientation) - m_scrollOffset;
+ if (m_offset + m_cursor < offset)
+ drawOffset += m_focusedLayout->Size(m_orientation) - m_layout->Size(m_orientation);
+ pos += drawOffset;
+ end += cacheAfter * m_layout->Size(m_orientation);
+
+ float focusedPos = 0;
+ CGUIListItemPtr focusedItem;
+ int current = offset - cacheBefore;
+ while (pos < end && m_items.size())
{
- CGUIListItemPtr item = m_items[itemNo];
- // render our item
- if (focused)
- {
- focusedPos = pos;
- focusedItem = item;
- }
- else
+ int itemNo = CorrectOffset(current, 0);
+ if (itemNo >= (int)m_items.size())
+ break;
+ bool focused = (current == m_offset + m_cursor);
+ if (itemNo >= 0)
{
- if (m_orientation == VERTICAL)
- RenderItem(origin.x, pos, item.get(), false);
+ CGUIListItemPtr item = m_items[itemNo];
+ // render our item
+ if (focused)
+ {
+ focusedPos = pos;
+ focusedItem = item;
+ }
else
- RenderItem(pos, origin.y, item.get(), false);
+ {
+ if (m_orientation == VERTICAL)
+ RenderItem(origin.x, pos, item.get(), false);
+ else
+ RenderItem(pos, origin.y, item.get(), false);
+ }
}
+ // increment our position
+ pos += focused ? m_focusedLayout->Size(m_orientation) : m_layout->Size(m_orientation);
+ current++;
+ }
+ // render focused item last so it can overlap other items
+ if (focusedItem)
+ {
+ if (m_orientation == VERTICAL)
+ RenderItem(origin.x, focusedPos, focusedItem.get(), true);
+ else
+ RenderItem(focusedPos, origin.y, focusedItem.get(), true);
}
- // increment our position
- pos += focused ? m_focusedLayout->Size(m_orientation) : m_layout->Size(m_orientation);
- current++;
- }
- // render focused item last so it can overlap other items
- if (focusedItem)
- {
- if (m_orientation == VERTICAL)
- RenderItem(origin.x, focusedPos, focusedItem.get(), true);
- else
- RenderItem(focusedPos, origin.y, focusedItem.get(), true);
- }
- g_graphicsContext.RestoreClipRegion();
+ g_graphicsContext.RestoreClipRegion();
}
UpdatePageControl(offset);