Submenu for the "Back to turn x" autosave loading menu entries.

This commit is contained in:
fendrin 2014-01-09 07:17:33 +01:00
parent 159c91d492
commit fa05514f5a
3 changed files with 10 additions and 3 deletions

View file

@ -70,13 +70,20 @@
id=menu-main
title= _ "Menu"
image=button_menu/menu_button_copper_H20
items=objectives,statistics,unitlist,statustable,save,savereplay,savemap,load,preferences,chatlog,AUTOSAVES,help,stopnetwork,startnetwork,quit
items=objectives,statistics,unitlist,statustable,save,savereplay,savemap,load,preferences,chatlog,menu-autosaves,help,stopnetwork,startnetwork,quit
ref=top-panel
rect="=+3,=+1,+100,=-4"
xanchor=fixed
yanchor=fixed
[/menu]
[menu]
title= _ "Back to..."
id=menu-autosaves
button=false
items=AUTOSAVES
[/menu]
[menu]
id=actions-menu
title= _ "Actions"

View file

@ -1735,8 +1735,7 @@ void display::enable_menu(const std::string& item, bool enable)
if(hasitem != menu->items().end()) {
const size_t index = menu - theme_.menus().begin();
if(index >= menu_buttons_.size()) {
assert(false);
return;
continue;
}
menu_buttons_[index].enable(enable);
}

View file

@ -901,6 +901,7 @@ bool play_controller::can_execute_command(const hotkey::hotkey_command& cmd, int
case hotkey::HOTKEY_MINIMAP_DRAW_UNITS:
case hotkey::HOTKEY_MINIMAP_DRAW_TERRAIN:
case hotkey::HOTKEY_MINIMAP_DRAW_VILLAGES:
case hotkey::HOTKEY_NULL:
return true;
// Commands that have some preconditions: