Disable some menu items in linger mode, fixes bug #10438.

This commit is contained in:
Mark de Wever 2008-01-13 06:19:00 +00:00
parent b4603b641d
commit 89ad461d00
4 changed files with 9 additions and 5 deletions

View file

@ -44,6 +44,8 @@ Version 1.3.13+svn:
* made "Show lobby joins of friends only" the default preference
* new menu option added to save replays manually
* show damage statistics for the current turn in the statistics window
* opening the action menu in linger mode no longer crashes the game
(bug #10438)
* WML engine:
* new tag [text_input] for [message] (patch #921)
* new tag [filter_vision] for Standard Unit Filter

View file

@ -17,6 +17,7 @@ Version 1.3.13+svn:
* The apple key works as shortcut modifier again.
* Made "Show lobby joins of friends only" the default preference.
* New menu option added to save replays manually.
* Opening the action menu in linger mode no longer crashes the game.
* Unit changes and balancing
* Increased the XP requirement of the Vampire Bat from 14 to 22.

View file

@ -543,7 +543,7 @@ bool play_controller::can_execute_command(hotkey::HOTKEY_COMMAND command, int in
case hotkey::HOTKEY_SHOW_ENEMY_MOVES:
case hotkey::HOTKEY_BEST_ENEMY_MOVES:
return enemies_visible();
return !linger_ && enemies_visible();
case hotkey::HOTKEY_LOAD_GAME:
return network::nconnections() == 0; // Can only load games if not in a network game
@ -552,9 +552,9 @@ bool play_controller::can_execute_command(hotkey::HOTKEY_COMMAND command, int in
return network::nconnections() > 0;
case hotkey::HOTKEY_REDO:
return !browse_ && !redo_stack_.empty() && !events::commands_disabled;
return !linger_ && !redo_stack_.empty() && !events::commands_disabled;
case hotkey::HOTKEY_UNDO:
return !browse_ && !undo_stack_.empty() && !events::commands_disabled;
return !linger_ && !undo_stack_.empty() && !events::commands_disabled;
case hotkey::HOTKEY_UNIT_DESCRIPTION:
return menu_handler_.current_unit(mouse_handler_) != units_.end();

View file

@ -709,13 +709,14 @@ bool playsingle_controller::can_execute_command(hotkey::HOTKEY_COMMAND command,
case hotkey::HOTKEY_RECRUIT:
case hotkey::HOTKEY_REPEAT_RECRUIT:
case hotkey::HOTKEY_RECALL:
return !browse_ && !linger_ && !events::commands_disabled;
case hotkey::HOTKEY_ENDTURN:
return (!browse_ || linger_) && !events::commands_disabled;
case hotkey::HOTKEY_DELAY_SHROUD:
return !browse_ && (current_team().uses_fog() || current_team().uses_shroud());
return !linger_ && (current_team().uses_fog() || current_team().uses_shroud());
case hotkey::HOTKEY_UPDATE_SHROUD:
return !browse_ && !events::commands_disabled && current_team().auto_shroud_updates() == false;
return !linger_ && !events::commands_disabled && current_team().auto_shroud_updates() == false;
// Commands we can only do if in debug mode
case hotkey::HOTKEY_CREATE_UNIT: