| 46 | |
| 47 | |
| 48 | void MenuOverlay::onHoverKey(const HoverKeyEvent& e) { |
| 49 | OpaqueWidget::onHoverKey(e); |
| 50 | if (e.isConsumed()) |
| 51 | return; |
| 52 | |
| 53 | if (e.action == GLFW_PRESS && e.isKeyCommand(GLFW_KEY_ESCAPE)) { |
| 54 | ActionEvent eAction; |
| 55 | onAction(eAction); |
| 56 | } |
| 57 | |
| 58 | // Consume all keys. |
| 59 | // Unfortunately this prevents MIDI computer keyboard from playing while a menu is open, but that might be a good thing for safety. |
| 60 | e.consume(this); |
| 61 | } |
| 62 | |
| 63 | |
| 64 | void MenuOverlay::onAction(const ActionEvent& e) { |
nothing calls this directly
no test coverage detected