From 5cf932198e289b8e8d2fe0ee3e57d7cfbf3b65eb Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Mon, 13 Feb 2012 23:24:09 -0600 Subject: [PATCH] KEYMAPPER: Fix Action ctor args in most keymaps --- backends/platform/maemo/maemo.cpp | 8 ++++---- base/main.cpp | 10 +++++----- engines/kyra/eobcommon.cpp | 4 ++-- engines/kyra/lol.cpp | 2 +- gui/gui-manager.cpp | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/backends/platform/maemo/maemo.cpp b/backends/platform/maemo/maemo.cpp index 728e8b40232..77d630fc300 100644 --- a/backends/platform/maemo/maemo.cpp +++ b/backends/platform/maemo/maemo.cpp @@ -140,19 +140,19 @@ Common::Keymap *OSystem_SDL_Maemo::getGlobalKeymap() { Action *act; - act = new Action(globalMap, "CLKM", _("Click Mode"), kKeyRemapActionType); + act = new Action(globalMap, "CLKM", _("Click Mode")); Event evt = Event(); evt.type = EVENT_CUSTOM_BACKEND; evt.customType = Maemo::kEventClickMode; act->addEvent(evt); - act = new Action(globalMap, "LCLK", _("Left Click"), kKeyRemapActionType); + act = new Action(globalMap, "LCLK", _("Left Click"), kLeftClickActionType); act->addLeftClickEvent(); - act = new Action(globalMap, "MCLK", _("Middle Click"), kKeyRemapActionType); + act = new Action(globalMap, "MCLK", _("Middle Click")); act->addMiddleClickEvent(); - act = new Action(globalMap, "RCLK", _("Right Click"), kKeyRemapActionType); + act = new Action(globalMap, "RCLK", _("Right Click"), kRightClickActionType); act->addRightClickEvent(); return globalMap; diff --git a/base/main.cpp b/base/main.cpp index f3ff081d280..81f9b91aa7d 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -274,16 +274,16 @@ static void setupKeymapper(OSystem &system) { // Now create the global keymap Keymap *primaryGlobalKeymap = new Keymap(kGlobalKeymapName); Action *act; - act = new Action(primaryGlobalKeymap, "MENU", _("Menu"), kGenericActionType, kSelectKeyType); + act = new Action(primaryGlobalKeymap, "MENU", _("Menu"), kMenuActionType); act->addEvent(EVENT_MAINMENU); - act = new Action(primaryGlobalKeymap, "SKCT", _("Skip"), kGenericActionType, kActionKeyType); + act = new Action(primaryGlobalKeymap, "SKCT", _("Skip")); act->addKeyEvent(KeyState(KEYCODE_ESCAPE, ASCII_ESCAPE, 0)); - act = new Action(primaryGlobalKeymap, "PAUS", _("Pause"), kGenericActionType, kStartKeyType); + act = new Action(primaryGlobalKeymap, "PAUS", _("Pause")); act->addKeyEvent(KeyState(KEYCODE_SPACE, ' ', 0)); - act = new Action(primaryGlobalKeymap, "SKLI", _("Skip line"), kGenericActionType, kActionKeyType); + act = new Action(primaryGlobalKeymap, "SKLI", _("Skip line")); act->addKeyEvent(KeyState(KEYCODE_PERIOD, '.', 0)); act = new Action(primaryGlobalKeymap, "VIRT", _("Display keyboard"), kVirtualKeyboardActionType); @@ -292,7 +292,7 @@ static void setupKeymapper(OSystem &system) { act = new Action(primaryGlobalKeymap, "REMP", _("Remap keys"), kKeyRemapActionType); act->addKeyEvent(KeyState(KEYCODE_F8, ASCII_F8, 0)); - act = new Action(primaryGlobalKeymap, "FULS", _("Toggle FullScreen"), kKeyRemapActionType); + act = new Action(primaryGlobalKeymap, "FULS", _("Toggle FullScreen")); act->addKeyEvent(KeyState(KEYCODE_RETURN, ASCII_RETURN, KBD_ALT)); mapper->addGlobalKeymap(primaryGlobalKeymap); diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp index 7f35b121232..ffee24fdee6 100644 --- a/engines/kyra/eobcommon.cpp +++ b/engines/kyra/eobcommon.cpp @@ -345,12 +345,12 @@ void EoBCoreEngine::initKeymap() { }; for (uint i = 0; i < ARRAYSIZE(keyActionEntries); ++i) { - Common::Action *const act = new Common::Action(engineKeyMap, keyActionEntries[i].id, keyActionEntries[i].description, Common::kGenericActionType, Common::kActionKeyType); + Common::Action *const act = new Common::Action(engineKeyMap, keyActionEntries[i].id, keyActionEntries[i].description); act->addKeyEvent(keyActionEntries[i].ks); } if (_flags.gameID == GI_EOB2) { - Common::Action *const act = new Common::Action(engineKeyMap, "SL6", _("Spell Level 6"), Common::kGenericActionType, Common::kActionKeyType); + Common::Action *const act = new Common::Action(engineKeyMap, "SL6", _("Spell Level 6")); act->addKeyEvent(Common::KeyState(Common::KEYCODE_6)); } diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index 258f53c602c..38e9d332590 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -491,7 +491,7 @@ void LoLEngine::initKeymap() { }; for (const Common::KeyActionEntry *entry = keyActionEntries; entry->id; ++entry) { - Common::Action *const act = new Common::Action(engineKeyMap, entry->id, entry->description, Common::kGenericActionType, Common::kActionKeyType); + Common::Action *const act = new Common::Action(engineKeyMap, entry->id, entry->description); act->addKeyEvent(entry->ks); } diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index 9fa41798d56..465af5448f6 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -112,10 +112,10 @@ void GuiManager::initKeymap() { Action *act; Keymap *guiMap = new Keymap(kGuiKeymapName); - act = new Action(guiMap, "CLOS", _("Close"), kGenericActionType, kStartKeyType); + act = new Action(guiMap, "CLOS", _("Close"), kQuitActionType); act->addKeyEvent(KeyState(KEYCODE_ESCAPE, ASCII_ESCAPE, 0)); - act = new Action(guiMap, "CLIK", _("Mouse click")); + act = new Action(guiMap, "CLIK", _("Mouse click"), kLeftClickActionType); act->addLeftClickEvent(); act = new Action(guiMap, "VIRT", _("Display keyboard"), kVirtualKeyboardActionType); @@ -124,7 +124,7 @@ void GuiManager::initKeymap() { act = new Action(guiMap, "REMP", _("Remap keys"), kKeyRemapActionType); act->addKeyEvent(KeyState(KEYCODE_F8, ASCII_F8, 0)); - act = new Action(guiMap, "FULS", _("Toggle FullScreen"), kKeyRemapActionType); + act = new Action(guiMap, "FULS", _("Toggle FullScreen")); act->addKeyEvent(KeyState(KEYCODE_RETURN, ASCII_RETURN, KBD_ALT)); mapper->addGlobalKeymap(guiMap);