diff options
author | Eugene Sandulenko | 2017-08-21 19:40:05 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-08-21 19:40:05 +0200 |
commit | 97ed6a2af73608dad953e740f58432921a6ac700 (patch) | |
tree | d56ac0a12eeb3091b7570f106d92a14ba100e784 /graphics/macgui | |
parent | 203b5138fa9bd32b2b218566639b9dfd7c53bd2c (diff) | |
download | scummvm-rg350-97ed6a2af73608dad953e740f58432921a6ac700.tar.gz scummvm-rg350-97ed6a2af73608dad953e740f58432921a6ac700.tar.bz2 scummvm-rg350-97ed6a2af73608dad953e740f58432921a6ac700.zip |
GRAPHICS: MACGUI: Pass command id when creating menu to avoid namespace clashes
This fixes Command menu in WAGE.
Diffstat (limited to 'graphics/macgui')
-rw-r--r-- | graphics/macgui/macmenu.cpp | 9 | ||||
-rw-r--r-- | graphics/macgui/macmenu.h | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp index dcf2e20470..cecdcabcea 100644 --- a/graphics/macgui/macmenu.cpp +++ b/graphics/macgui/macmenu.cpp @@ -56,11 +56,6 @@ enum { kFontStyleExtended = 64 }; -enum { - kMenuActionCommand -}; - - struct MacMenuSubItem { Common::String text; int action; @@ -216,7 +211,7 @@ void MacMenu::clearSubMenu(int id) { menu->subitems.clear(); } -void MacMenu::createSubMenuFromString(int id, const char *str) { +void MacMenu::createSubMenuFromString(int id, const char *str, int commandId) { clearSubMenu(id); MacMenuItem *menu = _items[id]; @@ -278,7 +273,7 @@ void MacMenu::createSubMenuFromString(int id, const char *str) { } } - menu->subitems.push_back(new MacMenuSubItem(item.c_str(), kMenuActionCommand, style, shortcut, enabled)); + menu->subitems.push_back(new MacMenuSubItem(item.c_str(), commandId, style, shortcut, enabled)); } item.clear(); diff --git a/graphics/macgui/macmenu.h b/graphics/macgui/macmenu.h index a25b65afbc..8b3e8ff258 100644 --- a/graphics/macgui/macmenu.h +++ b/graphics/macgui/macmenu.h @@ -52,7 +52,7 @@ public: int addMenuItem(const char *name); void addMenuSubItem(int id, const char *text, int action, int style = 0, char shortcut = 0, bool enabled = true); - void createSubMenuFromString(int id, const char *string); + void createSubMenuFromString(int id, const char *string, int commandId); void clearSubMenu(int id); bool draw(ManagedSurface *g, bool forceRedraw = false); |