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

Method isTouchInside

extensions/GUI/src/GUI/ControlExtension/Control.cpp:259–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257void Control::onTouchCancelled(Touch* /*touch*/, Event* /*event*/) {}
258
259bool Control::isTouchInside(Touch* touch)
260{
261 Vec2 touchLocation = touch->getLocation(); // Get the touch position
262 touchLocation = this->getParent()->convertToNodeSpace(touchLocation);
263 Rect bBox = getBoundingBox();
264 return bBox.containsPoint(touchLocation);
265}
266
267Vector<Invocation*>& Control::dispatchListforControlEvent(EventType controlEvent)
268{

Callers 2

onTouchMovedMethod · 0.45
onTouchEndedMethod · 0.45

Calls 4

convertToNodeSpaceMethod · 0.80
getLocationMethod · 0.45
getParentMethod · 0.45
containsPointMethod · 0.45

Tested by

no test coverage detected