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

Method onTouchesMoved

tests/cpp-tests/Source/MultiTouchTest/MultiTouchTest.cpp:95–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void MultiTouchTest::onTouchesMoved(const std::vector<Touch*>& touches, Event* event)
96{
97 for (auto& item : touches)
98 {
99 auto touch = item;
100 auto pTP = s_map.at(touch->getID());
101 auto location = touch->getLocation();
102
103 removeChild(pTP, true);
104 s_map.erase(touch->getID());
105
106 auto touchPointNew = TouchPoint::touchPointWithParent(this, location, *s_TouchColors[touch->getID() % 5]);
107 addChild(touchPointNew);
108 s_map.insert(touch->getID(), touchPointNew);
109 }
110}
111
112void MultiTouchTest::onTouchesEnded(const std::vector<Touch*>& touches, Event* event)
113{

Callers

nothing calls this directly

Calls 4

atMethod · 0.45
getLocationMethod · 0.45
eraseMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected