diff options
author | jmarshallnz <jmarshallnz@svn> | 2009-09-23 10:03:22 +0000 |
---|---|---|
committer | jmarshallnz <jmarshallnz@svn> | 2009-09-23 10:03:22 +0000 |
commit | c3018c6090df3c4cf3c5a96cc2310f931ef8f37f (patch) | |
tree | e22747627d63a591f15d9f87e15aa08cde10a563 /guilib/GUIButtonControl.cpp | |
parent | 59629d6966e46a99fc8e41a05f5e460d984997a4 (diff) |
changed: DWORD -> unsigned int for frame-based timings, and moved to using CTimeUtils::Update/GetFrameTime() for UI timing.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@23109 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUIButtonControl.cpp')
-rw-r--r-- | guilib/GUIButtonControl.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/guilib/GUIButtonControl.cpp b/guilib/GUIButtonControl.cpp index 6c52bb7991..5a85984bd7 100644 --- a/guilib/GUIButtonControl.cpp +++ b/guilib/GUIButtonControl.cpp @@ -36,7 +36,7 @@ CGUIButtonControl::CGUIButtonControl(int parentID, int controlID, float posX, fl { m_bSelected = false; m_alpha = 255; - m_dwFocusCounter = 0; + m_focusCounter = 0; m_label = labelInfo; ControlType = GUICONTROL_BUTTON; } @@ -60,20 +60,20 @@ void CGUIButtonControl::Render() { if (m_pulseOnSelect) { - DWORD dwAlphaCounter = m_dwFocusCounter + 2; - DWORD dwAlphaChannel; - if ((dwAlphaCounter % 128) >= 64) - dwAlphaChannel = dwAlphaCounter % 64; + unsigned int alphaCounter = m_focusCounter + 2; + unsigned int alphaChannel; + if ((alphaCounter % 128) >= 64) + alphaChannel = alphaCounter % 64; else - dwAlphaChannel = 63 - (dwAlphaCounter % 64); + alphaChannel = 63 - (alphaCounter % 64); - dwAlphaChannel += 192; - dwAlphaChannel = (DWORD)((float)m_alpha * (float)dwAlphaChannel / 255.0f); - m_imgFocus.SetAlpha((unsigned char)dwAlphaChannel); + alphaChannel += 192; + alphaChannel = (unsigned int)((float)m_alpha * (float)alphaChannel / 255.0f); + m_imgFocus.SetAlpha((unsigned char)alphaChannel); } m_imgFocus.SetVisible(true); m_imgNoFocus.SetVisible(false); - m_dwFocusCounter++; + m_focusCounter++; } else { @@ -175,7 +175,7 @@ bool CGUIButtonControl::OnMessage(CGUIMessage& message) void CGUIButtonControl::AllocResources() { CGUIControl::AllocResources(); - m_dwFocusCounter = 0; + m_focusCounter = 0; m_imgFocus.AllocResources(); m_imgNoFocus.AllocResources(); if (!m_width) |