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

Method tableCellTouched

tests/cpp-tests/Source/BaseTest.cpp:236–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236void TestList::tableCellTouched(TableView* table, TableViewCell* cell)
237{
238 if (_cellTouchEnabled)
239 {
240 auto index = cell->getIdx();
241 if (_testCallbacks[index])
242 {
243 auto test = _testCallbacks[index]();
244 if (test->getChildTestCount() > 0)
245 {
246 _tableOffset = table->getContentOffset();
247 _shouldRestoreTableOffset = true;
248 _cellTouchEnabled = false;
249 test->setTestParent(this);
250 test->runThisTest();
251 }
252 else
253 {
254 delete test;
255 }
256 }
257 }
258}
259
260TableViewCell* TestList::tableCellAtIndex(TableView* table, ssize_t idx)
261{

Callers 1

onTouchEndedMethod · 0.45

Calls 5

getIdxMethod · 0.80
getChildTestCountMethod · 0.80
getContentOffsetMethod · 0.80
setTestParentMethod · 0.80
runThisTestMethod · 0.45

Tested by

no test coverage detected