diff options
author | jmarshallnz <jmarshallnz@svn> | 2010-02-19 02:55:37 +0000 |
---|---|---|
committer | jmarshallnz <jmarshallnz@svn> | 2010-02-19 02:55:37 +0000 |
commit | 5f22c573c7fbb7a45cf2aaee2e1ddad7bb7899cb (patch) | |
tree | 616c5e8b5f6bb5ee97f4e2ed92ab661d2f22e555 /guilib/GUIBaseContainer.cpp | |
parent | af22bc05ff517e85698c5618ad0b322706955ed8 (diff) |
cleanup: Move all members of CAction private, accessed via getters, as we only ever set in constructors.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@27962 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUIBaseContainer.cpp')
-rw-r--r-- | guilib/GUIBaseContainer.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/guilib/GUIBaseContainer.cpp b/guilib/GUIBaseContainer.cpp index 9407dafff3..102a9f3a32 100644 --- a/guilib/GUIBaseContainer.cpp +++ b/guilib/GUIBaseContainer.cpp @@ -198,13 +198,13 @@ void CGUIBaseContainer::RenderItem(float posX, float posY, CGUIListItem *item, b bool CGUIBaseContainer::OnAction(const CAction &action) { - if (action.actionId >= KEY_ASCII) + if (action.GetID() >= KEY_ASCII) { - OnJumpLetter((char)(action.actionId & 0xff)); + OnJumpLetter((char)(action.GetID() & 0xff)); return true; } - switch (action.actionId) + switch (action.GetID()) { case ACTION_MOVE_LEFT: case ACTION_MOVE_RIGHT: @@ -212,16 +212,16 @@ bool CGUIBaseContainer::OnAction(const CAction &action) case ACTION_MOVE_UP: { if (!HasFocus()) return false; - if (action.holdTime > HOLD_TIME_START && - ((m_orientation == VERTICAL && (action.actionId == ACTION_MOVE_UP || action.actionId == ACTION_MOVE_DOWN)) || - (m_orientation == HORIZONTAL && (action.actionId == ACTION_MOVE_LEFT || action.actionId == ACTION_MOVE_RIGHT)))) + if (action.GetHoldTime() > HOLD_TIME_START && + ((m_orientation == VERTICAL && (action.GetID() == ACTION_MOVE_UP || action.GetID() == ACTION_MOVE_DOWN)) || + (m_orientation == HORIZONTAL && (action.GetID() == ACTION_MOVE_LEFT || action.GetID() == ACTION_MOVE_RIGHT)))) { // action is held down - repeat a number of times - float speed = std::min(1.0f, (float)(action.holdTime - HOLD_TIME_START) / (HOLD_TIME_END - HOLD_TIME_START)); + float speed = std::min(1.0f, (float)(action.GetHoldTime() - HOLD_TIME_START) / (HOLD_TIME_END - HOLD_TIME_START)); unsigned int itemsPerFrame = 1; if (m_lastHoldTime) // number of rows/10 items/second max speed itemsPerFrame = std::max((unsigned int)1, (unsigned int)(speed * 0.0001f * GetRows() * (CTimeUtils::GetFrameTime() - m_lastHoldTime))); m_lastHoldTime = CTimeUtils::GetFrameTime(); - if (action.actionId == ACTION_MOVE_LEFT || action.actionId == ACTION_MOVE_UP) + if (action.GetID() == ACTION_MOVE_LEFT || action.GetID() == ACTION_MOVE_UP) while (itemsPerFrame--) MoveUp(false); else while (itemsPerFrame--) MoveDown(false); @@ -265,15 +265,15 @@ bool CGUIBaseContainer::OnAction(const CAction &action) case ACTION_JUMP_SMS8: case ACTION_JUMP_SMS9: { - OnJumpSMS(action.actionId - ACTION_JUMP_SMS2 + 2); + OnJumpSMS(action.GetID() - ACTION_JUMP_SMS2 + 2); return true; } break; default: - if (action.actionId) + if (action.GetID()) { - return OnClick(action.actionId); + return OnClick(action.GetID()); } } return false; |