Esempio n. 1
0
void UIListView::endRecordSlidAction()
{
    if (_children->count() <= 0)
    {
        return;
    }
    if (_slidTime <= 0.016f)
    {
        return;
    }
    float totalDis = 0;
    totalDis = _touchEndLocation-_touchStartLocation;
    float orSpeed = fabs(totalDis)/(_slidTime);
    startAutoScrollChildren(orSpeed / 4);
    
    _bePressed = false;
    _slidTime = 0.0;
}
Esempio n. 2
0
void UIScrollViewP::endRecordSlidAction()
{
    if (m_children->count() <= 0)
    {
        return;
    }
    if (m_fSlidTime <= 0.016f)
    {
        return;
    }
    float totalDis = 0;
    totalDis = m_fTouchEndLocation-m_fTouchStartLocation;
    float orSpeed = fabs(totalDis)/(m_fSlidTime);
    startAutoScrollChildren(orSpeed);
    
    m_bBePressed = false;
    m_fSlidTime = 0.0;
}