void UIScrollViewP::handlePressLogic(const CCPoint &touchPoint) { CCPoint nsp = m_pRenderer->convertToNodeSpace(touchPoint); switch (m_eDirection) { case SCROLLVIEW_DIR_VERTICAL: // vertical m_fTouchMoveStartLocation = nsp.y; m_fTouchStartLocation = nsp.y; break; case SCROLLVIEW_DIR_HORIZONTAL: // horizontal m_fTouchMoveStartLocation = nsp.x; m_fTouchStartLocation = nsp.x; break; default: break; } startRecordSlidAction(); }
void ScrollView::handlePressLogic(Touch *touch) { startRecordSlidAction(); _bePressed = true; _inertiaPrevTouchTimestamp = utils::getTimeInMilliseconds(); _inertiaTouchDisplacements.clear(); _inertiaTouchTimeDeltas.clear(); if(_verticalScrollBar != nullptr) { _verticalScrollBar->onTouchBegan(); } if(_horizontalScrollBar != nullptr) { _horizontalScrollBar->onTouchBegan(); } }
void UIListView::handlePressLogic(const Point &touchPoint) { Point nsp = _renderer->convertToNodeSpace(touchPoint); switch (_direction) { case LISTVIEW_DIR_VERTICAL: // vertical _touchMoveStartLocation = nsp.y; _touchStartLocation = nsp.y; break; case LISTVIEW_DIR_HORIZONTAL: // horizontal _touchMoveStartLocation = nsp.x; _touchStartLocation = nsp.x; break; default: break; } startRecordSlidAction(); clearCollectOverArray(); }