Merge branch 'master' of github.com:wesnoth/wesnoth

This commit is contained in:
Charles Dang 2018-03-19 02:16:17 +11:00
commit 61f653f91a
2 changed files with 21 additions and 22 deletions

2
.gitignore vendored
View file

@ -49,7 +49,7 @@ projectfiles/**/*objs*
# Visual Studio
projectfiles/VC*
!projectfiles/VC12
!projectfiles/VC14
projectfiles/VC*/.vs/
projectfiles/VC*/*.vc.*db
projectfiles/VC*/*.sdf

View file

@ -357,6 +357,26 @@ bool command_executor::do_execute_command(const hotkey_command& cmd, int /*inde
case HOTKEY_SURRENDER:
surrender_game();
break;
case HOTKEY_MINIMAP_DRAW_TERRAIN:
preferences::toggle_minimap_draw_terrain();
recalculate_minimap();
break;
case HOTKEY_MINIMAP_CODING_TERRAIN:
preferences::toggle_minimap_terrain_coding();
recalculate_minimap();
break;
case HOTKEY_MINIMAP_CODING_UNIT:
preferences::toggle_minimap_movement_coding();
recalculate_minimap();
break;
case HOTKEY_MINIMAP_DRAW_UNITS:
preferences::toggle_minimap_draw_units();
recalculate_minimap();
break;
case HOTKEY_MINIMAP_DRAW_VILLAGES:
preferences::toggle_minimap_draw_villages();
recalculate_minimap();
break;
default:
return false;
}
@ -571,27 +591,6 @@ void command_executor::execute_command(const SDL_Event& event, int index)
}
switch (command.id) {
case HOTKEY_MINIMAP_DRAW_TERRAIN:
preferences::toggle_minimap_draw_terrain();
recalculate_minimap();
break;
case HOTKEY_MINIMAP_CODING_TERRAIN:
preferences::toggle_minimap_terrain_coding();
recalculate_minimap();
break;
case HOTKEY_MINIMAP_CODING_UNIT:
preferences::toggle_minimap_movement_coding();
recalculate_minimap();
break;
case HOTKEY_MINIMAP_DRAW_UNITS:
preferences::toggle_minimap_draw_units();
recalculate_minimap();
break;
case HOTKEY_MINIMAP_DRAW_VILLAGES:
preferences::toggle_minimap_draw_villages();
recalculate_minimap();
break;
case HOTKEY_FULLSCREEN:
CVideo::get_singleton().toggle_fullscreen();
break;