diff options
author | Eugene Sandulenko | 2016-02-05 11:07:23 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-14 17:13:02 +0100 |
commit | a2e3d33a2dd9c9500504990630d2e6bb2c0da25c (patch) | |
tree | ba84d49a0d2c287d5a233f329942f4a8bb21d826 | |
parent | 7e8c1028d31e8b86fb6bc4cc05ac8dcf1e772eb2 (diff) | |
download | scummvm-rg350-a2e3d33a2dd9c9500504990630d2e6bb2c0da25c.tar.gz scummvm-rg350-a2e3d33a2dd9c9500504990630d2e6bb2c0da25c.tar.bz2 scummvm-rg350-a2e3d33a2dd9c9500504990630d2e6bb2c0da25c.zip |
WAGE: Get rid of magic constants in menu code for referring menu items
-rw-r--r-- | engines/wage/menu.cpp | 28 | ||||
-rw-r--r-- | engines/wage/menu.h | 8 |
2 files changed, 22 insertions, 14 deletions
diff --git a/engines/wage/menu.cpp b/engines/wage/menu.cpp index 69ac07b019..a140254ecc 100644 --- a/engines/wage/menu.cpp +++ b/engines/wage/menu.cpp @@ -86,20 +86,20 @@ struct MenuData { byte shortcut; bool enabled; } menuSubItems[] = { - { 1, "New", kMenuActionNew, 0, false }, - { 1, "Open...", kMenuActionOpen, 0, false }, - { 1, "Close", kMenuActionClose, 0, true }, - { 1, "Save", kMenuActionSave, 0, false }, - { 1, "Save as...", kMenuActionSaveAs, 0, true }, - { 1, "Revert", kMenuActionRevert, 0, false }, - { 1, "Quit", kMenuActionQuit, 0, true }, - - { 2, "Undo", kMenuActionUndo, 'Z', false }, - { 2, NULL, 0, 0, false }, - { 2, "Cut", kMenuActionCut, 'K', false }, - { 2, "Copy", kMenuActionCopy, 'C', false }, - { 2, "Paste", kMenuActionPaste, 'V', false }, - { 2, "Clear", kMenuActionClear, 'B', false }, + { kMenuFile, "New", kMenuActionNew, 0, false }, + { kMenuFile, "Open...", kMenuActionOpen, 0, false }, + { kMenuFile, "Close", kMenuActionClose, 0, true }, + { kMenuFile, "Save", kMenuActionSave, 0, false }, + { kMenuFile, "Save as...", kMenuActionSaveAs, 0, true }, + { kMenuFile, "Revert", kMenuActionRevert, 0, false }, + { kMenuFile, "Quit", kMenuActionQuit, 0, true }, + + { kMenuEdit, "Undo", kMenuActionUndo, 'Z', false }, + { kMenuEdit, NULL, 0, 0, false }, + { kMenuEdit, "Cut", kMenuActionCut, 'K', false }, + { kMenuEdit, "Copy", kMenuActionCopy, 'C', false }, + { kMenuEdit, "Paste", kMenuActionPaste, 'V', false }, + { kMenuEdit, "Clear", kMenuActionClear, 'B', false }, { 0, NULL, 0, 0, false } }; diff --git a/engines/wage/menu.h b/engines/wage/menu.h index a37e6b037c..cee7611664 100644 --- a/engines/wage/menu.h +++ b/engines/wage/menu.h @@ -64,6 +64,14 @@ enum { }; enum { + kMenuAbout = 0, + kMenuFile = 1, + kMenuEdit = 2, + kMenuCommands = 3, + kMenuWeapons = 4 +}; + +enum { kMenuActionAbout, kMenuActionNew, kMenuActionOpen, |