| 61 | } |
| 62 | |
| 63 | void MenuItem::onEnter(const EnterEvent& e) { |
| 64 | Menu* parentMenu = dynamic_cast<Menu*>(parent); |
| 65 | if (!parentMenu) |
| 66 | return; |
| 67 | |
| 68 | parentMenu->activeEntry = NULL; |
| 69 | |
| 70 | // Try to create child menu |
| 71 | Menu* childMenu = createChildMenu(); |
| 72 | if (childMenu) { |
| 73 | parentMenu->activeEntry = this; |
| 74 | childMenu->box.pos = parent->box.pos.plus(box.getTopRight()); |
| 75 | } |
| 76 | parentMenu->setChildMenu(childMenu); |
| 77 | } |
| 78 | |
| 79 | void MenuItem::onDragDrop(const DragDropEvent& e) { |
| 80 | if (e.origin == this && !disabled) { |
no test coverage detected