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

Method onTouchEnded

tests/cpp-tests/Source/BaseTest.cpp:72–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 }
71
72 virtual void onTouchEnded(Touch* touch, Event* event) override
73 {
74 if (!this->isVisible())
75 {
76 return;
77 }
78
79 if (_touchedCell)
80 {
81 auto label = (Label*)_touchedCell->getChildByTag(TABEL_LABEL_TAG);
82
83 Rect bbox = label->getBoundingBox();
84 bbox.origin = _touchedCell->convertToWorldSpace(bbox.origin);
85
86 if (bbox.containsPoint(touch->getLocation()) && _tableViewDelegate != nullptr)
87 {
88 _tableViewDelegate->tableCellUnhighlight(this, _touchedCell);
89 _tableViewDelegate->tableCellTouched(this, _touchedCell);
90 }
91
92 _touchedCell = nullptr;
93 }
94
95 ScrollView::onTouchEnded(touch, event);
96 }
97
98 bool onMouseScroll(Event* event)
99 {

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected