| 528 | } |
| 529 | |
| 530 | MenuItem* Menu::getItemForTouch(Touch* touch, const Camera* camera) |
| 531 | { |
| 532 | Vec2 touchLocation = touch->getLocation(); |
| 533 | for (const auto& item : _children) |
| 534 | { |
| 535 | MenuItem* child = dynamic_cast<MenuItem*>(item); |
| 536 | if (nullptr == child || false == child->isVisible() || false == child->isEnabled()) |
| 537 | { |
| 538 | continue; |
| 539 | } |
| 540 | Rect rect; |
| 541 | rect.size = child->getContentSize(); |
| 542 | if (isScreenPointInRect(touchLocation, camera, child->getWorldToNodeTransform(), rect, nullptr)) |
| 543 | { |
| 544 | return child; |
| 545 | } |
| 546 | } |
| 547 | return nullptr; |
| 548 | } |
| 549 | |
| 550 | void Menu::setOpacityModifyRGB(bool /*value*/) {} |
| 551 |
no test coverage detected