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

Method hitTest

core/ui/UITextField.cpp:345–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343}
344
345bool TextField::hitTest(const Vec2& pt, const Camera* camera, Vec3* /*p*/) const
346{
347 if (false == _useTouchArea)
348 {
349 return Widget::hitTest(pt, camera, nullptr);
350 }
351
352 auto size = getContentSize();
353 auto anch = getAnchorPoint();
354 Rect rect((size.width - _touchWidth) * anch.x, (size.height - _touchHeight) * anch.y, _touchWidth, _touchHeight);
355 return isScreenPointInRect(pt, camera, getWorldToNodeTransform(), rect, nullptr);
356}
357
358Vec2 TextField::getTouchSize() const
359{

Callers

nothing calls this directly

Calls 2

getAnchorPointFunction · 0.85
isScreenPointInRectFunction · 0.85

Tested by

no test coverage detected