From 60eece4b60189bdbfedaf9695055201d3ba4e9fd Mon Sep 17 00:00:00 2001 From: xq Date: Thu, 6 Feb 2020 05:31:57 +0200 Subject: [PATCH] Fis Escape button not closing the minimap fixes #211 --- src/game/boe.main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/game/boe.main.cpp b/src/game/boe.main.cpp index a67b63f8..0597567b 100644 --- a/src/game/boe.main.cpp +++ b/src/game/boe.main.cpp @@ -306,6 +306,14 @@ void handle_one_minimap_event(const sf::Event& event) { map_visible = false; } else if(event.type == sf::Event::GainedFocus) { makeFrontWindow(mainPtr); + } else if(event.type == sf::Event::KeyPressed) { + switch(event.key.code) { + case sf::Keyboard::Escape: + mini_map.setVisible(false); + map_visible = false; + break; + default: break; + } } }