From d0b8aecf15a45b0fb731a12161107a0cf611656e Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Mon, 30 Nov 2020 16:43:37 -0500 Subject: [PATCH] Make MenuOverlay consume all key presses so Scene doesn't respond to them when a menu is open. --- src/ui/MenuOverlay.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/MenuOverlay.cpp b/src/ui/MenuOverlay.cpp index f7902683..c3ec2f58 100644 --- a/src/ui/MenuOverlay.cpp +++ b/src/ui/MenuOverlay.cpp @@ -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); }