| 343 | } |
| 344 | |
| 345 | bool 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 | |
| 358 | Vec2 TextField::getTouchSize() const |
| 359 | { |
nothing calls this directly
no test coverage detected