From: Ingo Ruhnke Date: Fri, 8 Aug 2014 22:07:38 +0000 (+0200) Subject: Simplifying the Menu API a bit X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=cd5c93468cbcd27e369630da3c5fad237306c398;p=supertux.git Simplifying the Menu API a bit --- diff --git a/src/gui/menu.cpp b/src/gui/menu.cpp index 581414e7f..3e0656fd9 100644 --- a/src/gui/menu.cpp +++ b/src/gui/menu.cpp @@ -172,9 +172,9 @@ Menu::add_back(const std::string& text) } MenuItem* -Menu::add_submenu(const std::string& text, int submenu, int id) +Menu::add_submenu(const std::string& text, int submenu) { - std::unique_ptr item(new MenuItem(MN_GOTO, id)); + std::unique_ptr item(new MenuItem(MN_GOTO)); item->text = text; item->target_menu = submenu; return add_item(std::move(item)); diff --git a/src/gui/menu.hpp b/src/gui/menu.hpp index 006eda7bf..80a0428aa 100644 --- a/src/gui/menu.hpp +++ b/src/gui/menu.hpp @@ -62,7 +62,7 @@ public: MenuItem* add_toggle(int id, const std::string& text, bool toggled = false); MenuItem* add_inactive(int id, const std::string& text); MenuItem* add_back(const std::string& text); - MenuItem* add_submenu(const std::string& text, int submenu, int id = -1); + MenuItem* add_submenu(const std::string& text, int submenu); MenuItem* add_controlfield(int id, const std::string& text, const std::string& mapping = ""); MenuItem* add_string_select(int id, const std::string& text);