Fix the menu entry "End Turn" not switching to "End Scenario".
This commit is contained in:
parent
9c4e4b1272
commit
6689c4281b
3 changed files with 9 additions and 1 deletions
|
@ -1393,7 +1393,7 @@ std::vector<std::string> command_executor::get_menu_images(display& disp, const
|
|||
} else {
|
||||
std::string desc = hotkey::get_description(item);
|
||||
if (hk == HOTKEY_ENDTURN) {
|
||||
const theme::menu *b = disp.get_theme().get_menu_item("button-endturn");
|
||||
const theme::action *b = disp.get_theme().get_action_item("button-endturn");
|
||||
if (b) {
|
||||
desc = b->title();
|
||||
}
|
||||
|
|
|
@ -891,6 +891,13 @@ const theme::menu *theme::get_menu_item(const std::string &key) const
|
|||
return NULL;
|
||||
}
|
||||
|
||||
const theme::action *theme::get_action_item(const std::string &key) const
|
||||
{
|
||||
BOOST_FOREACH(const theme::action &a, actions_) {
|
||||
if (a.get_id() == key) return &a;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
theme::object* theme::refresh_title(const std::string& id, const std::string& new_title){
|
||||
|
||||
|
|
|
@ -261,6 +261,7 @@ public:
|
|||
|
||||
const status_item* get_status_item(const std::string& item) const;
|
||||
const menu *get_menu_item(const std::string &key) const;
|
||||
const action* get_action_item(const std::string &key) const;
|
||||
|
||||
const SDL_Rect& main_map_location(const SDL_Rect& screen) const
|
||||
{ return main_map_.location(screen); }
|
||||
|
|
Loading…
Add table
Reference in a new issue