New hotkey (by default unassigned) to toggle the Animated Map option

Solves bug #15976.
This commit is contained in:
Ignacio R. Morelle 2010-11-20 14:54:03 +00:00
parent 62e28ceb5f
commit b2a032226b
7 changed files with 16 additions and 0 deletions

View File

@ -16,6 +16,8 @@ Version 1.9.2+svn:
* User interface:
* Converted some dialog boxes to GUI2
* Campaign difficulty descriptions must use Pango markup now
* Added a new hotkey sequence (by default unassigned) to toggle animated map mode
(feature #15976).
* WML engine:
* Created tag [petrify] (bug #17077). Moved [unpetrify] to lua.
* Introduced [recall]fire_event=yes|no (default no) parameter (fixes

View File

@ -846,6 +846,7 @@ bool editor_controller::can_execute_command(hotkey::HOTKEY_COMMAND command, int
case HOTKEY_MAP_SCREENSHOT:
case HOTKEY_TOGGLE_GRID:
case HOTKEY_MOUSE_SCROLL:
case HOTKEY_ANIMATE_MAP:
case HOTKEY_MUTE:
case HOTKEY_PREFERENCES:
case HOTKEY_HELP:

View File

@ -47,6 +47,7 @@ const struct {
bool hidden;
hotkey::scope scope;
} hotkey_list_[] = {
{ hotkey::HOTKEY_ANIMATE_MAP, "animatemap", N_("Animate Map"), false, hotkey::SCOPE_GENERAL },
{ hotkey::HOTKEY_CYCLE_UNITS, "cycle", N_("Next Unit"), false, hotkey::SCOPE_GAME },
{ hotkey::HOTKEY_CYCLE_BACK_UNITS, "cycleback", N_("Previous Unit"), false, hotkey::SCOPE_GAME },
{ hotkey::HOTKEY_ADD_WAYPOINT, "addwaypoint", N_("Add waypoint"), false, hotkey::SCOPE_GAME },
@ -983,6 +984,9 @@ void execute_command(display& disp, HOTKEY_COMMAND command, command_executor* ex
gui::dialog(disp,_("Screenshot failed"),"",gui::MESSAGE).show();
break;
}
case HOTKEY_ANIMATE_MAP:
preferences::set_animate_map(!preferences::animate_map());
break;
case HOTKEY_MOUSE_SCROLL:
preferences::enable_mouse_scroll(!preferences::mouse_scroll_enabled());
break;

View File

@ -58,6 +58,7 @@ enum HOTKEY_COMMAND {
HOTKEY_REPLAY_NEXT_SIDE, HOTKEY_REPLAY_SHOW_EVERYTHING,
HOTKEY_REPLAY_SHOW_EACH, HOTKEY_REPLAY_SHOW_TEAM1,
HOTKEY_REPLAY_SKIP_ANIMATION,
HOTKEY_ANIMATE_MAP,
// Whiteboard commands
HOTKEY_WB_TOGGLE,

View File

@ -761,6 +761,7 @@ bool play_controller::can_execute_command(hotkey::HOTKEY_COMMAND command, int in
case hotkey::HOTKEY_TOGGLE_ELLIPSES:
case hotkey::HOTKEY_TOGGLE_GRID:
case hotkey::HOTKEY_MOUSE_SCROLL:
case hotkey::HOTKEY_ANIMATE_MAP:
case hotkey::HOTKEY_STATUS_TABLE:
case hotkey::HOTKEY_MUTE:
case hotkey::HOTKEY_PREFERENCES:

View File

@ -534,6 +534,11 @@ bool animate_map()
return preferences::get("animate_map", true);
}
void set_animate_map(bool value)
{
set("animate_map", value);
}
bool show_standing_animations()
{
return preferences::get("unit_standing_animations", true);

View File

@ -144,6 +144,8 @@ namespace preferences {
void set_draw_delay(int value);
bool animate_map();
void set_animate_map(bool value);
bool show_standing_animations();
bool show_fps();