Fis Escape button not closing the minimap

fixes #211
This commit is contained in:
xq
2020-02-06 05:31:57 +02:00
parent a8ed8b3bb4
commit 60eece4b60

View File

@@ -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;
}
}
}