MCPcopy Create free account
hub / github.com/axmolengine/axmol / onTouchEnded

Method onTouchEnded

extensions/GUI/src/GUI/ScrollView/TableView.cpp:592–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590}
591
592void TableView::onTouchEnded(Touch* pTouch, Event* pEvent)
593{
594 if (!this->isVisible())
595 {
596 return;
597 }
598
599 if (_touchedCell)
600 {
601 Rect bb = this->getBoundingBox();
602 bb.origin = _parent->convertToWorldSpace(bb.origin);
603
604 if (bb.containsPoint(pTouch->getLocation()) && _tableViewDelegate != nullptr)
605 {
606 _tableViewDelegate->tableCellUnhighlight(this, _touchedCell);
607 _tableViewDelegate->tableCellTouched(this, _touchedCell);
608 }
609
610 _touchedCell = nullptr;
611 }
612
613 ScrollView::onTouchEnded(pTouch, pEvent);
614}
615
616bool TableView::onTouchBegan(Touch* pTouch, Event* pEvent)
617{

Calls 7

convertToWorldSpaceMethod · 0.80
isVisibleMethod · 0.45
getBoundingBoxMethod · 0.45
containsPointMethod · 0.45
getLocationMethod · 0.45
tableCellUnhighlightMethod · 0.45
tableCellTouchedMethod · 0.45

Tested by

no test coverage detected