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

Method onTouchesBegan

tests/cpp-tests/Source/MultiTouchTest/MultiTouchTest.cpp:82–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80static Map<int, TouchPoint*> s_map;
81
82void MultiTouchTest::onTouchesBegan(const std::vector<Touch*>& touches, Event* event)
83{
84 for (auto& item : touches)
85 {
86 auto touch = item;
87 auto location = touch->getLocation();
88 auto touchPoint = TouchPoint::touchPointWithParent(this, location, *s_TouchColors[touch->getID() % 5]);
89
90 addChild(touchPoint);
91 s_map.insert(touch->getID(), touchPoint);
92 }
93}
94
95void MultiTouchTest::onTouchesMoved(const std::vector<Touch*>& touches, Event* event)
96{

Callers

nothing calls this directly

Calls 2

getLocationMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected