aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBorja Lorente2016-07-29 11:19:26 +0200
committerBorja Lorente2016-07-31 14:05:14 +0200
commitffbc6b0c783b5d86a91ef15a4974cde7f606c585 (patch)
treef6e54b99355648bc75488776d8888936d2299feb /engines
parent68b2d44a0f732aed23afaa96e18b0786fca1d77d (diff)
downloadscummvm-rg350-ffbc6b0c783b5d86a91ef15a4974cde7f606c585.tar.gz
scummvm-rg350-ffbc6b0c783b5d86a91ef15a4974cde7f606c585.tar.bz2
scummvm-rg350-ffbc6b0c783b5d86a91ef15a4974cde7f606c585.zip
GRAPHICS: Create wrapper namespace for MacMenu constants
Diffstat (limited to 'engines')
-rw-r--r--engines/wage/gui.cpp64
-rw-r--r--engines/wage/gui.h3
2 files changed, 35 insertions, 32 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index f8971e13bc..d74b77bb0c 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -62,22 +62,22 @@
namespace Wage {
static const Graphics::MenuData menuSubItems[] = {
- { Graphics::kMenuHighLevel, "File", 0, 0, false },
- { Graphics::kMenuHighLevel, "Edit", 0, 0, false },
- { Graphics::kMenuFile, "New", Graphics::kMenuActionNew, 0, false },
- { Graphics::kMenuFile, "Open...", Graphics::kMenuActionOpen, 0, true },
- { Graphics::kMenuFile, "Close", Graphics::kMenuActionClose, 0, true },
- { Graphics::kMenuFile, "Save", Graphics::kMenuActionSave, 0, true },
- { Graphics::kMenuFile, "Save as...", Graphics::kMenuActionSaveAs, 0, true },
- { Graphics::kMenuFile, "Revert", Graphics::kMenuActionRevert, 0, false },
- { Graphics::kMenuFile, "Quit", Graphics::kMenuActionQuit, 0, true },
-
- { Graphics::kMenuEdit, "Undo", Graphics::kMenuActionUndo, 'Z', false },
- { Graphics::kMenuEdit, NULL, 0, 0, false },
- { Graphics::kMenuEdit, "Cut", Graphics::kMenuActionCut, 'K', false },
- { Graphics::kMenuEdit, "Copy", Graphics::kMenuActionCopy, 'C', false },
- { Graphics::kMenuEdit, "Paste", Graphics::kMenuActionPaste, 'V', false },
- { Graphics::kMenuEdit, "Clear", Graphics::kMenuActionClear, 'B', false },
+ { kMenuHighLevel, "File", 0, 0, false },
+ { kMenuHighLevel, "Edit", 0, 0, false },
+ { kMenuFile, "New", kMenuActionNew, 0, false },
+ { kMenuFile, "Open...", kMenuActionOpen, 0, true },
+ { kMenuFile, "Close", kMenuActionClose, 0, true },
+ { kMenuFile, "Save", kMenuActionSave, 0, true },
+ { 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 }
};
@@ -148,7 +148,7 @@ Gui::Gui(WageEngine *engine) {
_menu->setCommandsCallback(menuCommandsCallback, this);
_menu->addStaticMenus(menuSubItems);
- _menu->addMenuSubItem(Graphics::kMenuAbout, _engine->_world->getAboutMenuItemName(), Graphics::kMenuActionAbout);
+ _menu->addMenuSubItem(kMenuAbout, _engine->_world->getAboutMenuItemName(), kMenuActionAbout);
_commandsMenuId = _menu->addMenuItem(_engine->_world->_commandsMenuName.c_str());
regenCommandsMenu();
@@ -298,7 +298,7 @@ void Gui::regenWeaponsMenu() {
command += " ";
command += obj->_name;
- _menu->addMenuSubItem(_weaponsMenuId, command.c_str(), Graphics::kMenuActionCommand, 0, 0, true);
+ _menu->addMenuSubItem(_weaponsMenuId, command.c_str(), kMenuActionCommand, 0, 0, true);
empty = false;
}
@@ -321,39 +321,39 @@ void menuCommandsCallback(int action, Common::String &text, void *data) {
void Gui::executeMenuCommand(int action, Common::String &text) {
switch(action) {
- case Graphics::kMenuActionAbout:
- case Graphics::kMenuActionNew:
- case Graphics::kMenuActionClose:
- case Graphics::kMenuActionRevert:
- case Graphics::kMenuActionQuit:
+ case kMenuActionAbout:
+ case kMenuActionNew:
+ case kMenuActionClose:
+ case kMenuActionRevert:
+ case kMenuActionQuit:
break;
- case Graphics::kMenuActionOpen:
+ case kMenuActionOpen:
_engine->scummVMSaveLoadDialog(false);
break;
- case Graphics::kMenuActionSave:
- case Graphics::kMenuActionSaveAs:
+ case kMenuActionSave:
+ case kMenuActionSaveAs:
_engine->scummVMSaveLoadDialog(true);
break;
- case Graphics::kMenuActionUndo:
+ case kMenuActionUndo:
actionUndo();
break;
- case Graphics::kMenuActionCut:
+ case kMenuActionCut:
actionCut();
break;
- case Graphics::kMenuActionCopy:
+ case kMenuActionCopy:
actionCopy();
break;
- case Graphics::kMenuActionPaste:
+ case kMenuActionPaste:
actionPaste();
break;
- case Graphics::kMenuActionClear:
+ case kMenuActionClear:
actionClear();
break;
- case Graphics::kMenuActionCommand:
+ case kMenuActionCommand:
_engine->processTurn(&text, NULL);
break;
diff --git a/engines/wage/gui.h b/engines/wage/gui.h
index ed841b0e0d..4c9580d372 100644
--- a/engines/wage/gui.h
+++ b/engines/wage/gui.h
@@ -53,11 +53,14 @@
#include "graphics/managed_surface.h"
#include "graphics/macgui/macwindowmanager.h"
#include "graphics/macgui/macwindow.h"
+#include "graphics/macgui/macmenu.h"
#include "common/events.h"
#include "common/rect.h"
namespace Wage {
+
+using namespace Graphics::MacMenuConstants;
class Scene;
class WageEngine;