make 'a' toggle the map
This commit is contained in:
@@ -944,12 +944,22 @@ void handle_one_minimap_event(const sf::Event& event) {
|
||||
} else if(event.type == sf::Event::GainedFocus) {
|
||||
makeFrontWindow(mainPtr);
|
||||
} else if(event.type == sf::Event::KeyPressed) {
|
||||
switch(event.key.code) {
|
||||
switch(event.key.code){
|
||||
case sf::Keyboard::Escape:
|
||||
close_map(true);
|
||||
return;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
char chr = keyToChar(event.key.code, event.key.shift);
|
||||
switch(chr){
|
||||
case 'a':
|
||||
close_map(true);
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1537,6 +1537,7 @@ bool is_door(location destination) {
|
||||
return false;
|
||||
}
|
||||
|
||||
extern void close_map(bool record);
|
||||
|
||||
void display_map() {
|
||||
if(recording){
|
||||
@@ -1549,8 +1550,12 @@ void display_map() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Show the automap if it's not already visible
|
||||
if(map_visible) return;
|
||||
// Hide the automap if it's already visible
|
||||
if(map_visible){
|
||||
close_map(false);
|
||||
return;
|
||||
}
|
||||
|
||||
give_help(62,0);
|
||||
|
||||
rectangle the_rect;
|
||||
|
Reference in New Issue
Block a user