Browse Source

Make MenuOverlay consume all key presses so Scene doesn't respond to them when a menu is open.

tags/v2.0.0
Andrew Belt 4 years ago
parent
commit
d0b8aecf15
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/ui/MenuOverlay.cpp

+ 3
- 1
src/ui/MenuOverlay.cpp View File

@@ -39,8 +39,10 @@ void MenuOverlay::onHoverKey(const event::HoverKey& e) {

if (e.action == GLFW_PRESS && e.key == GLFW_KEY_ESCAPE) {
requestDelete();
e.consume(this);
}

// Consume all key presses
e.consume(this);
}




Loading…
Cancel
Save