diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-18 19:47:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-18 19:47:28 +0300 |
commit | 7da95c7f4da447876458a0b1a17736b9a2865844 (patch) | |
tree | 4b6ac0ab5bc32a11234a5363de95d0cfec8cb7d5 /src/gui | |
parent | 515ce6c1413b5e3da131f3e4997abdc39c003a2c (diff) | |
download | manaverse-7da95c7f4da447876458a0b1a17736b9a2865844.tar.gz manaverse-7da95c7f4da447876458a0b1a17736b9a2865844.tar.bz2 manaverse-7da95c7f4da447876458a0b1a17736b9a2865844.tar.xz manaverse-7da95c7f4da447876458a0b1a17736b9a2865844.zip |
Move inputaction into separate file.
Diffstat (limited to 'src/gui')
33 files changed, 540 insertions, 518 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index b695b669b..6a7727c07 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -439,10 +439,10 @@ bool Gui::handleKeyInput() // tabbing is enable check for tab press and // change focus. if (!eventConsumed && keyInput.getActionId() - == static_cast<int>(Input::KEY_GUI_TAB) + == static_cast<int>(InputAction::GUI_TAB) && keyInput.getType() == KeyInput::PRESSED) { - if (inputManager.isActionActive(Input::KEY_GUI_MOD)) + if (inputManager.isActionActive(InputAction::GUI_MOD)) mFocusHandler->tabPrevious(); else mFocusHandler->tabNext(); diff --git a/src/gui/popups/statuspopup.cpp b/src/gui/popups/statuspopup.cpp index 2c149f755..a1e0b502c 100644 --- a/src/gui/popups/statuspopup.cpp +++ b/src/gui/popups/statuspopup.cpp @@ -125,7 +125,7 @@ void StatusPopup::view(const int x, const int y) void StatusPopup::setLabelText(const int num, const std::string &text, - const Input::KeyAction key) const + const InputAction::Type key) const { Label *const label = mLabels[num]; label->setCaption(strprintf("%s %s", text.c_str(), @@ -139,33 +139,33 @@ void StatusPopup::updateLabels() const return; setLabelText(0, player_node->getInvertDirectionString(), - Input::KEY_INVERT_DIRECTION); + InputAction::INVERT_DIRECTION); setLabelText(1, player_node->getCrazyMoveTypeString(), - Input::KEY_CHANGE_CRAZY_MOVES_TYPE); + InputAction::CHANGE_CRAZY_MOVES_TYPE); setLabelText(2, player_node->getMoveToTargetTypeString(), - Input::KEY_CHANGE_MOVE_TO_TARGET); + InputAction::CHANGE_MOVE_TO_TARGET); setLabelText(3, player_node->getFollowModeString(), - Input::KEY_CHANGE_FOLLOW_MODE); + InputAction::CHANGE_FOLLOW_MODE); setLabelText(4, player_node->getAttackWeaponTypeString(), - Input::KEY_CHANGE_ATTACK_WEAPON_TYPE); + InputAction::CHANGE_ATTACK_WEAPON_TYPE); setLabelText(5, player_node->getAttackTypeString(), - Input::KEY_CHANGE_ATTACK_TYPE); + InputAction::CHANGE_ATTACK_TYPE); setLabelText(6, player_node->getQuickDropCounterString(), - Input::KEY_SWITCH_QUICK_DROP); + InputAction::SWITCH_QUICK_DROP); setLabelText(7, player_node->getPickUpTypeString(), - Input::KEY_CHANGE_PICKUP_TYPE); + InputAction::CHANGE_PICKUP_TYPE); setLabelText(8, LocalPlayer::getDebugPathString(), - Input::KEY_PATHFIND); + InputAction::PATHFIND); setLabelText(9, player_node->getMagicAttackString(), - Input::KEY_SWITCH_MAGIC_ATTACK); + InputAction::SWITCH_MAGIC_ATTACK); setLabelText(10, player_node->getPvpAttackString(), - Input::KEY_SWITCH_PVP_ATTACK); + InputAction::SWITCH_PVP_ATTACK); setLabelText(11, player_node->getGameModifiersString(), - Input::KEY_DISABLE_GAME_MODIFIERS); + InputAction::DISABLE_GAME_MODIFIERS); setLabelText(12, player_node->getImitationModeString(), - Input::KEY_CHANGE_IMITATION_MODE); + InputAction::CHANGE_IMITATION_MODE); setLabelText(13, player_node->getAwayModeString(), - Input::KEY_AWAY); + InputAction::AWAY); setLabelText(14, LocalPlayer::getCameraModeString(), - Input::KEY_CAMERA); + InputAction::CAMERA); } diff --git a/src/gui/popups/statuspopup.h b/src/gui/popups/statuspopup.h index 6b9b917b7..e0fe09d14 100644 --- a/src/gui/popups/statuspopup.h +++ b/src/gui/popups/statuspopup.h @@ -24,6 +24,7 @@ #ifndef GUI_POPUPS_STATUSPOPUP_H #define GUI_POPUPS_STATUSPOPUP_H +#include "input/inputaction.h" #include "input/keydata.h" #include "gui/widgets/popup.h" @@ -63,7 +64,7 @@ class StatusPopup final : public Popup void updateLabels() const; void setLabelText(const int num, const std::string &text, - const Input::KeyAction key) const; + const InputAction::Type key) const; Label *mLabels[STATUSPOPUP_NUM_LABELS]; }; diff --git a/src/gui/setupactiondata.h b/src/gui/setupactiondata.h index 891875d7c..7a3131a74 100644 --- a/src/gui/setupactiondata.h +++ b/src/gui/setupactiondata.h @@ -24,6 +24,7 @@ #ifndef GUI_SETUPACTIONDATA_H #define GUI_SETUPACTIONDATA_H +#include "input/inputaction.h" #include "input/keydata.h" #include "utils/gettext.h" @@ -55,162 +56,162 @@ static SetupActionData setupActionData0[] = { // TRANSLATORS: input action name N_("Target and attack keys"), - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "", }, { // TRANSLATORS: input action name N_("Attack"), - Input::KEY_ATTACK, + InputAction::ATTACK, "", }, { // TRANSLATORS: input action name N_("Target & Attack"), - Input::KEY_TARGET_ATTACK, + InputAction::TARGET_ATTACK, "", }, { // TRANSLATORS: input action name N_("Move to Target"), - Input::KEY_MOVE_TO_TARGET, + InputAction::MOVE_TO_TARGET, "", }, { // TRANSLATORS: input action name N_("Change Move to Target type"), - Input::KEY_CHANGE_MOVE_TO_TARGET, + InputAction::CHANGE_MOVE_TO_TARGET, "", }, { // TRANSLATORS: input action name N_("Move to Home location"), - Input::KEY_MOVE_TO_HOME, + InputAction::MOVE_TO_HOME, "", }, { // TRANSLATORS: input action name N_("Set home location"), - Input::KEY_SET_HOME, + InputAction::SET_HOME, "", }, { // TRANSLATORS: input action name N_("Move to navigation point"), - Input::KEY_MOVE_TO_POINT, + InputAction::MOVE_TO_POINT, "", }, { // TRANSLATORS: input action name N_("Talk"), - Input::KEY_TALK, + InputAction::TALK, "", }, { // TRANSLATORS: input action name N_("Stop Attack / Modifier key"), - Input::KEY_STOP_ATTACK, + InputAction::STOP_ATTACK, "", }, { // TRANSLATORS: input action name N_("Untarget"), - Input::KEY_UNTARGET, + InputAction::UNTARGET, "", }, { // TRANSLATORS: input action name N_("Target monster"), - Input::KEY_TARGET_MONSTER, + InputAction::TARGET_MONSTER, "", }, { // TRANSLATORS: input action name N_("Target NPC"), - Input::KEY_TARGET_NPC, + InputAction::TARGET_NPC, "", }, { // TRANSLATORS: input action name N_("Target Player"), - Input::KEY_TARGET_PLAYER, + InputAction::TARGET_PLAYER, "", }, { // TRANSLATORS: input action name N_("Other Keys"), - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "", }, { // TRANSLATORS: input action name N_("Pickup"), - Input::KEY_PICKUP, + InputAction::PICKUP, "", }, { // TRANSLATORS: input action name N_("Change Pickup Type"), - Input::KEY_CHANGE_PICKUP_TYPE, + InputAction::CHANGE_PICKUP_TYPE, "", }, { // TRANSLATORS: input action name N_("Sit"), - Input::KEY_SIT, + InputAction::SIT, "", }, { // TRANSLATORS: input action name N_("Screenshot"), - Input::KEY_SCREENSHOT, + InputAction::SCREENSHOT, "", }, { // TRANSLATORS: input action name N_("Enable/Disable Trading"), - Input::KEY_TRADE, + InputAction::TRADE, "", }, { // TRANSLATORS: input action name N_("Open trade window"), - Input::KEY_OPEN_TRADE, + InputAction::OPEN_TRADE, "", }, { // TRANSLATORS: input action name N_("Change Map View Mode"), - Input::KEY_PATHFIND, + InputAction::PATHFIND, "", }, { // TRANSLATORS: input action name N_("Select OK"), - Input::KEY_OK, + InputAction::OK, "", }, { // TRANSLATORS: input action name N_("Quit"), - Input::KEY_QUIT, + InputAction::QUIT, "", }, { // TRANSLATORS: input action name N_("Stop or sit"), - Input::KEY_STOP_SIT, + InputAction::STOP_SIT, "", }, { // TRANSLATORS: input action name N_("Return to safe video mode"), - Input::KEY_SAFE_VIDEO, + InputAction::SAFE_VIDEO, "", }, { "", - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" } }; @@ -220,144 +221,144 @@ static SetupActionData setupActionData1[] = { // TRANSLATORS: input action name N_("Shortcuts modifiers keys"), - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" }, { // TRANSLATORS: input action name N_("Item Shortcuts Key"), - Input::KEY_SHORTCUTS_KEY, + InputAction::SHORTCUTS_KEY, "", }, { // TRANSLATORS: input action name N_("Shortcuts keys"), - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 1), - Input::KEY_SHORTCUT_1, + InputAction::SHORTCUT_1, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 2), - Input::KEY_SHORTCUT_2, + InputAction::SHORTCUT_2, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 3), - Input::KEY_SHORTCUT_3, + InputAction::SHORTCUT_3, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 4), - Input::KEY_SHORTCUT_4, + InputAction::SHORTCUT_4, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 5), - Input::KEY_SHORTCUT_5, + InputAction::SHORTCUT_5, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 6), - Input::KEY_SHORTCUT_6, + InputAction::SHORTCUT_6, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 7), - Input::KEY_SHORTCUT_7, + InputAction::SHORTCUT_7, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 8), - Input::KEY_SHORTCUT_8, + InputAction::SHORTCUT_8, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 9), - Input::KEY_SHORTCUT_9, + InputAction::SHORTCUT_9, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 10), - Input::KEY_SHORTCUT_10, + InputAction::SHORTCUT_10, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 11), - Input::KEY_SHORTCUT_11, + InputAction::SHORTCUT_11, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 12), - Input::KEY_SHORTCUT_12, + InputAction::SHORTCUT_12, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 13), - Input::KEY_SHORTCUT_13, + InputAction::SHORTCUT_13, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 14), - Input::KEY_SHORTCUT_14, + InputAction::SHORTCUT_14, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 15), - Input::KEY_SHORTCUT_15, + InputAction::SHORTCUT_15, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 16), - Input::KEY_SHORTCUT_16, + InputAction::SHORTCUT_16, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 17), - Input::KEY_SHORTCUT_17, + InputAction::SHORTCUT_17, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 18), - Input::KEY_SHORTCUT_18, + InputAction::SHORTCUT_18, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 19), - Input::KEY_SHORTCUT_19, + InputAction::SHORTCUT_19, "", }, { // TRANSLATORS: input action name strprintf(N_("Item Shortcut %d"), 20), - Input::KEY_SHORTCUT_20, + InputAction::SHORTCUT_20, "", }, { "", - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" } }; @@ -367,186 +368,186 @@ static SetupActionData setupActionData2[] = { // TRANSLATORS: input action name N_("Show Windows Menu"), - Input::KEY_SHOW_WINDOWS, + InputAction::SHOW_WINDOWS, "", }, { // TRANSLATORS: input action name N_("Hide Windows"), - Input::KEY_HIDE_WINDOWS, + InputAction::HIDE_WINDOWS, "", }, { // TRANSLATORS: input action name N_("About Window"), - Input::KEY_WINDOW_ABOUT, + InputAction::WINDOW_ABOUT, "", }, { // TRANSLATORS: input action name N_("Help Window"), - Input::KEY_WINDOW_HELP, + InputAction::WINDOW_HELP, "", }, { // TRANSLATORS: input action name N_("Status Window"), - Input::KEY_WINDOW_STATUS, + InputAction::WINDOW_STATUS, "", }, { // TRANSLATORS: input action name N_("Inventory Window"), - Input::KEY_WINDOW_INVENTORY, + InputAction::WINDOW_INVENTORY, "", }, { // TRANSLATORS: input action name N_("Equipment Window"), - Input::KEY_WINDOW_EQUIPMENT, + InputAction::WINDOW_EQUIPMENT, "", }, { // TRANSLATORS: input action name N_("Skill Window"), - Input::KEY_WINDOW_SKILL, + InputAction::WINDOW_SKILL, "", }, { // TRANSLATORS: input action name N_("Minimap Window"), - Input::KEY_WINDOW_MINIMAP, + InputAction::WINDOW_MINIMAP, "", }, { // TRANSLATORS: input action name N_("Chat Window"), - Input::KEY_WINDOW_CHAT, + InputAction::WINDOW_CHAT, "", }, { // TRANSLATORS: input action name N_("Item Shortcut Window"), - Input::KEY_WINDOW_SHORTCUT, + InputAction::WINDOW_SHORTCUT, "", }, { // TRANSLATORS: input action name N_("Setup Window"), - Input::KEY_WINDOW_SETUP, + InputAction::WINDOW_SETUP, "", }, { // TRANSLATORS: input action name N_("Debug Window"), - Input::KEY_WINDOW_DEBUG, + InputAction::WINDOW_DEBUG, "", }, { // TRANSLATORS: input action name N_("Social Window"), - Input::KEY_WINDOW_SOCIAL, + InputAction::WINDOW_SOCIAL, "", }, { // TRANSLATORS: input action name N_("Emote Shortcut Window"), - Input::KEY_WINDOW_EMOTE_SHORTCUT, + InputAction::WINDOW_EMOTE_SHORTCUT, "", }, { // TRANSLATORS: input action name N_("Outfits Window"), - Input::KEY_WINDOW_OUTFIT, + InputAction::WINDOW_OUTFIT, "", }, { // TRANSLATORS: input action name N_("Shop Window"), - Input::KEY_WINDOW_SHOP, + InputAction::WINDOW_SHOP, "", }, { // TRANSLATORS: input action name N_("Quick drop Window"), - Input::KEY_WINDOW_DROP, + InputAction::WINDOW_DROP, "", }, { // TRANSLATORS: input action name N_("Kill Stats Window"), - Input::KEY_WINDOW_KILLS, + InputAction::WINDOW_KILLS, "", }, { // TRANSLATORS: input action name N_("Commands Window"), - Input::KEY_WINDOW_SPELLS, + InputAction::WINDOW_SPELLS, "", }, { // TRANSLATORS: input action name N_("Bot Checker Window"), - Input::KEY_WINDOW_BOT_CHECKER, + InputAction::WINDOW_BOT_CHECKER, "", }, { // TRANSLATORS: input action name N_("Who Is Online Window"), - Input::KEY_WINDOW_ONLINE, + InputAction::WINDOW_ONLINE, "", }, { // TRANSLATORS: input action name N_("Did you know Window"), - Input::KEY_WINDOW_DIDYOUKNOW, + InputAction::WINDOW_DIDYOUKNOW, "", }, { // TRANSLATORS: input action name N_("Quests Window"), - Input::KEY_WINDOW_QUESTS, + InputAction::WINDOW_QUESTS, "", }, { // TRANSLATORS: input action name N_("Previous Social Tab"), - Input::KEY_PREV_SOCIAL_TAB, + InputAction::PREV_SOCIAL_TAB, "", }, { // TRANSLATORS: input action name N_("Next Social Tab"), - Input::KEY_NEXT_SOCIAL_TAB, + InputAction::NEXT_SOCIAL_TAB, "", }, { // TRANSLATORS: input action name N_("Previous Shortcuts tab"), - Input::KEY_PREV_SHORTCUTS_TAB, + InputAction::PREV_SHORTCUTS_TAB, "", }, { // TRANSLATORS: input action name N_("Next Shortcuts tab"), - Input::KEY_NEXT_SHORTCUTS_TAB, + InputAction::NEXT_SHORTCUTS_TAB, "", }, { // TRANSLATORS: input action name N_("Previous Commands tab"), - Input::KEY_PREV_COMMANDS_TAB, + InputAction::PREV_COMMANDS_TAB, "", }, { // TRANSLATORS: input action name N_("Next Commands tab"), - Input::KEY_NEXT_COMMANDS_TAB, + InputAction::NEXT_COMMANDS_TAB, "", }, { "", - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" } }; @@ -556,312 +557,312 @@ static SetupActionData setupActionData3[] = { // TRANSLATORS: input action name N_("Emote modifiers keys"), - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" }, { // TRANSLATORS: input action name N_("Emote modifier key"), - Input::KEY_EMOTE, + InputAction::EMOTE, "", }, { // TRANSLATORS: input action name N_("Emote shortcuts"), - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 1), - Input::KEY_EMOTE_1, + InputAction::EMOTE_1, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 2), - Input::KEY_EMOTE_2, + InputAction::EMOTE_2, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 3), - Input::KEY_EMOTE_3, + InputAction::EMOTE_3, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 4), - Input::KEY_EMOTE_4, + InputAction::EMOTE_4, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 5), - Input::KEY_EMOTE_5, + InputAction::EMOTE_5, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 6), - Input::KEY_EMOTE_6, + InputAction::EMOTE_6, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 7), - Input::KEY_EMOTE_7, + InputAction::EMOTE_7, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 8), - Input::KEY_EMOTE_8, + InputAction::EMOTE_8, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 9), - Input::KEY_EMOTE_9, + InputAction::EMOTE_9, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 10), - Input::KEY_EMOTE_10, + InputAction::EMOTE_10, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 11), - Input::KEY_EMOTE_11, + InputAction::EMOTE_11, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 12), - Input::KEY_EMOTE_12, + InputAction::EMOTE_12, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 13), - Input::KEY_EMOTE_13, + InputAction::EMOTE_13, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 14), - Input::KEY_EMOTE_14, + InputAction::EMOTE_14, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 15), - Input::KEY_EMOTE_15, + InputAction::EMOTE_15, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 16), - Input::KEY_EMOTE_16, + InputAction::EMOTE_16, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 17), - Input::KEY_EMOTE_17, + InputAction::EMOTE_17, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 18), - Input::KEY_EMOTE_18, + InputAction::EMOTE_18, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 19), - Input::KEY_EMOTE_19, + InputAction::EMOTE_19, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 20), - Input::KEY_EMOTE_20, + InputAction::EMOTE_20, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 21), - Input::KEY_EMOTE_21, + InputAction::EMOTE_21, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 22), - Input::KEY_EMOTE_22, + InputAction::EMOTE_22, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 23), - Input::KEY_EMOTE_23, + InputAction::EMOTE_23, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 24), - Input::KEY_EMOTE_24, + InputAction::EMOTE_24, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 25), - Input::KEY_EMOTE_25, + InputAction::EMOTE_25, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 26), - Input::KEY_EMOTE_26, + InputAction::EMOTE_26, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 27), - Input::KEY_EMOTE_27, + InputAction::EMOTE_27, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 28), - Input::KEY_EMOTE_28, + InputAction::EMOTE_28, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 29), - Input::KEY_EMOTE_29, + InputAction::EMOTE_29, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 30), - Input::KEY_EMOTE_30, + InputAction::EMOTE_30, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 31), - Input::KEY_EMOTE_31, + InputAction::EMOTE_31, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 32), - Input::KEY_EMOTE_32, + InputAction::EMOTE_32, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 33), - Input::KEY_EMOTE_33, + InputAction::EMOTE_33, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 34), - Input::KEY_EMOTE_34, + InputAction::EMOTE_34, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 35), - Input::KEY_EMOTE_35, + InputAction::EMOTE_35, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 36), - Input::KEY_EMOTE_36, + InputAction::EMOTE_36, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 37), - Input::KEY_EMOTE_37, + InputAction::EMOTE_37, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 38), - Input::KEY_EMOTE_38, + InputAction::EMOTE_38, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 39), - Input::KEY_EMOTE_39, + InputAction::EMOTE_39, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 40), - Input::KEY_EMOTE_40, + InputAction::EMOTE_40, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 41), - Input::KEY_EMOTE_41, + InputAction::EMOTE_41, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 42), - Input::KEY_EMOTE_42, + InputAction::EMOTE_42, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 43), - Input::KEY_EMOTE_43, + InputAction::EMOTE_43, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 44), - Input::KEY_EMOTE_44, + InputAction::EMOTE_44, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 45), - Input::KEY_EMOTE_45, + InputAction::EMOTE_45, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 46), - Input::KEY_EMOTE_46, + InputAction::EMOTE_46, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 47), - Input::KEY_EMOTE_47, + InputAction::EMOTE_47, "", }, { // TRANSLATORS: input action name strprintf(N_("Emote Shortcut %d"), 48), - Input::KEY_EMOTE_48, + InputAction::EMOTE_48, "", }, { "", - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" } }; @@ -871,324 +872,324 @@ static SetupActionData setupActionData4[] = { // TRANSLATORS: input action name N_("Outfits keys"), - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" }, { // TRANSLATORS: input action name N_("Wear Outfit"), - Input::KEY_WEAR_OUTFIT, + InputAction::WEAR_OUTFIT, "", }, { // TRANSLATORS: input action name N_("Copy Outfit"), - Input::KEY_COPY_OUTFIT, + InputAction::COPY_OUTFIT, "", }, { // TRANSLATORS: input action name N_("Copy equipped to Outfit"), - Input::KEY_COPY_EQUIPED_OUTFIT, + InputAction::COPY_EQUIPED_OUTFIT, "", }, { // TRANSLATORS: input action name N_("Outfits shortcuts"), - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 1), - Input::KEY_OUTFIT_1, + InputAction::OUTFIT_1, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 2), - Input::KEY_OUTFIT_2, + InputAction::OUTFIT_2, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 3), - Input::KEY_OUTFIT_3, + InputAction::OUTFIT_3, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 4), - Input::KEY_OUTFIT_4, + InputAction::OUTFIT_4, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 5), - Input::KEY_OUTFIT_5, + InputAction::OUTFIT_5, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 6), - Input::KEY_OUTFIT_6, + InputAction::OUTFIT_6, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 7), - Input::KEY_OUTFIT_7, + InputAction::OUTFIT_7, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 8), - Input::KEY_OUTFIT_8, + InputAction::OUTFIT_8, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 9), - Input::KEY_OUTFIT_9, + InputAction::OUTFIT_9, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 10), - Input::KEY_OUTFIT_10, + InputAction::OUTFIT_10, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 11), - Input::KEY_OUTFIT_11, + InputAction::OUTFIT_11, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 12), - Input::KEY_OUTFIT_12, + InputAction::OUTFIT_12, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 13), - Input::KEY_OUTFIT_13, + InputAction::OUTFIT_13, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 14), - Input::KEY_OUTFIT_14, + InputAction::OUTFIT_14, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 15), - Input::KEY_OUTFIT_15, + InputAction::OUTFIT_15, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 16), - Input::KEY_OUTFIT_16, + InputAction::OUTFIT_16, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 17), - Input::KEY_OUTFIT_17, + InputAction::OUTFIT_17, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 18), - Input::KEY_OUTFIT_18, + InputAction::OUTFIT_18, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 19), - Input::KEY_OUTFIT_19, + InputAction::OUTFIT_19, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 20), - Input::KEY_OUTFIT_20, + InputAction::OUTFIT_20, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 21), - Input::KEY_OUTFIT_21, + InputAction::OUTFIT_21, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 22), - Input::KEY_OUTFIT_22, + InputAction::OUTFIT_22, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 23), - Input::KEY_OUTFIT_23, + InputAction::OUTFIT_23, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 24), - Input::KEY_OUTFIT_24, + InputAction::OUTFIT_24, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 25), - Input::KEY_OUTFIT_25, + InputAction::OUTFIT_25, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 26), - Input::KEY_OUTFIT_26, + InputAction::OUTFIT_26, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 27), - Input::KEY_OUTFIT_27, + InputAction::OUTFIT_27, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 28), - Input::KEY_OUTFIT_28, + InputAction::OUTFIT_28, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 29), - Input::KEY_OUTFIT_29, + InputAction::OUTFIT_29, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 30), - Input::KEY_OUTFIT_30, + InputAction::OUTFIT_30, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 31), - Input::KEY_OUTFIT_31, + InputAction::OUTFIT_31, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 32), - Input::KEY_OUTFIT_32, + InputAction::OUTFIT_32, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 33), - Input::KEY_OUTFIT_33, + InputAction::OUTFIT_33, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 34), - Input::KEY_OUTFIT_34, + InputAction::OUTFIT_34, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 35), - Input::KEY_OUTFIT_35, + InputAction::OUTFIT_35, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 36), - Input::KEY_OUTFIT_36, + InputAction::OUTFIT_36, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 37), - Input::KEY_OUTFIT_37, + InputAction::OUTFIT_37, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 38), - Input::KEY_OUTFIT_38, + InputAction::OUTFIT_38, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 39), - Input::KEY_OUTFIT_39, + InputAction::OUTFIT_39, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 40), - Input::KEY_OUTFIT_40, + InputAction::OUTFIT_40, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 41), - Input::KEY_OUTFIT_41, + InputAction::OUTFIT_41, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 42), - Input::KEY_OUTFIT_42, + InputAction::OUTFIT_42, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 43), - Input::KEY_OUTFIT_43, + InputAction::OUTFIT_43, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 44), - Input::KEY_OUTFIT_44, + InputAction::OUTFIT_44, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 45), - Input::KEY_OUTFIT_45, + InputAction::OUTFIT_45, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 46), - Input::KEY_OUTFIT_46, + InputAction::OUTFIT_46, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 47), - Input::KEY_OUTFIT_47, + InputAction::OUTFIT_47, "", }, { // TRANSLATORS: input action name strprintf(N_("Outfit Shortcut %d"), 48), - Input::KEY_OUTFIT_48, + InputAction::OUTFIT_48, "", }, { "", - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" } }; @@ -1198,121 +1199,121 @@ static SetupActionData setupActionData5[] = { // TRANSLATORS: input action name N_("Toggle Chat"), - Input::KEY_TOGGLE_CHAT, + InputAction::TOGGLE_CHAT, "", }, { // TRANSLATORS: input action name N_("Scroll Chat Up"), - Input::KEY_SCROLL_CHAT_UP, + InputAction::SCROLL_CHAT_UP, "", }, { // TRANSLATORS: input action name N_("Scroll Chat Down"), - Input::KEY_SCROLL_CHAT_DOWN, + InputAction::SCROLL_CHAT_DOWN, "", }, { // TRANSLATORS: input action name N_("Previous Chat Tab"), - Input::KEY_PREV_CHAT_TAB, + InputAction::PREV_CHAT_TAB, "", }, { // TRANSLATORS: input action name N_("Next Chat Tab"), - Input::KEY_NEXT_CHAT_TAB, + InputAction::NEXT_CHAT_TAB, "", }, { // TRANSLATORS: input action name N_("Close current Chat Tab"), - Input::KEY_CLOSE_CHAT_TAB, + InputAction::CLOSE_CHAT_TAB, "", }, { // TRANSLATORS: input action name N_("Previous chat line"), - Input::KEY_CHAT_PREV_HISTORY, + InputAction::CHAT_PREV_HISTORY, "", }, { // TRANSLATORS: input action name N_("Next chat line"), - Input::KEY_CHAT_NEXT_HISTORY, + InputAction::CHAT_NEXT_HISTORY, "", }, { // TRANSLATORS: input action name N_("Chat modifier key"), - Input::KEY_CHAT_MOD, + InputAction::CHAT_MOD, "", }, { // TRANSLATORS: input action name N_("Show smiles"), - Input::KEY_GUI_F1, + InputAction::GUI_F1, "", }, { "F2", - Input::KEY_GUI_F2, + InputAction::GUI_F2, "", }, { "F3", - Input::KEY_GUI_F3, + InputAction::GUI_F3, "", }, { "F4", - Input::KEY_GUI_F4, + InputAction::GUI_F4, "", }, { "F5", - Input::KEY_GUI_F5, + InputAction::GUI_F5, "", }, { "F6", - Input::KEY_GUI_F6, + InputAction::GUI_F6, "", }, { "F7", - Input::KEY_GUI_F7, + InputAction::GUI_F7, "", }, { "F8", - Input::KEY_GUI_F8, + InputAction::GUI_F8, "", }, { "F9", - Input::KEY_GUI_F9, + InputAction::GUI_F9, "", }, { "F10", - Input::KEY_GUI_F10, + InputAction::GUI_F10, "", }, { "F11", - Input::KEY_GUI_F11, + InputAction::GUI_F11, "", }, { "F12", - Input::KEY_GUI_F12, + InputAction::GUI_F12, "", }, { "", - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" } }; @@ -1322,168 +1323,168 @@ static SetupActionData setupActionData6[] = { // TRANSLATORS: input action name N_("Ignore input 1"), - Input::KEY_IGNORE_INPUT_1, + InputAction::IGNORE_INPUT_1, "", }, { // TRANSLATORS: input action name N_("Ignore input 2"), - Input::KEY_IGNORE_INPUT_2, + InputAction::IGNORE_INPUT_2, "", }, { // TRANSLATORS: input action name N_("Direct Up"), - Input::KEY_DIRECT_UP, + InputAction::DIRECT_UP, "", }, { // TRANSLATORS: input action name N_("Direct Down"), - Input::KEY_DIRECT_DOWN, + InputAction::DIRECT_DOWN, "", }, { // TRANSLATORS: input action name N_("Direct Left"), - Input::KEY_DIRECT_LEFT, + InputAction::DIRECT_LEFT, "", }, { // TRANSLATORS: input action name N_("Direct Right"), - Input::KEY_DIRECT_RIGHT, + InputAction::DIRECT_RIGHT, "", }, { // TRANSLATORS: input action name N_("Crazy moves"), - Input::KEY_CRAZY_MOVES, + InputAction::CRAZY_MOVES, "", }, { // TRANSLATORS: input action name N_("Change Crazy Move mode"), - Input::KEY_CHANGE_CRAZY_MOVES_TYPE, + InputAction::CHANGE_CRAZY_MOVES_TYPE, "", }, { // TRANSLATORS: input action name N_("Quick Drop N Items from 0 slot"), - Input::KEY_QUICK_DROP, + InputAction::QUICK_DROP, "", }, { // TRANSLATORS: input action name N_("Quick Drop N Items"), - Input::KEY_QUICK_DROPN, + InputAction::QUICK_DROPN, "", }, { // TRANSLATORS: input action name N_("Switch Quick Drop Counter"), - Input::KEY_SWITCH_QUICK_DROP, + InputAction::SWITCH_QUICK_DROP, "", }, { // TRANSLATORS: input action name N_("Quick heal target or self"), - Input::KEY_MAGIC_INMA1, + InputAction::MAGIC_INMA1, "", }, { // TRANSLATORS: input action name N_("Use #itenplz spell"), - Input::KEY_MAGIC_ITENPLZ, + InputAction::MAGIC_ITENPLZ, "", }, { // TRANSLATORS: input action name N_("Use magic attack"), - Input::KEY_MAGIC_ATTACK, + InputAction::MAGIC_ATTACK, "", }, { // TRANSLATORS: input action name N_("Switch magic attack"), - Input::KEY_SWITCH_MAGIC_ATTACK, + InputAction::SWITCH_MAGIC_ATTACK, "", }, { // TRANSLATORS: input action name N_("Switch pvp attack"), - Input::KEY_SWITCH_PVP_ATTACK, + InputAction::SWITCH_PVP_ATTACK, "", }, { // TRANSLATORS: input action name N_("Change move type"), - Input::KEY_INVERT_DIRECTION, + InputAction::INVERT_DIRECTION, "", }, { // TRANSLATORS: input action name N_("Change Attack Weapon Type"), - Input::KEY_CHANGE_ATTACK_WEAPON_TYPE, + InputAction::CHANGE_ATTACK_WEAPON_TYPE, "", }, { // TRANSLATORS: input action name N_("Change Attack Type"), - Input::KEY_CHANGE_ATTACK_TYPE, + InputAction::CHANGE_ATTACK_TYPE, "", }, { // TRANSLATORS: input action name N_("Change Follow mode"), - Input::KEY_CHANGE_FOLLOW_MODE, + InputAction::CHANGE_FOLLOW_MODE, "", }, { // TRANSLATORS: input action name N_("Change Imitation mode"), - Input::KEY_CHANGE_IMITATION_MODE, + InputAction::CHANGE_IMITATION_MODE, "", }, { // TRANSLATORS: input action name N_("Disable / Enable Game modifier keys"), - Input::KEY_DISABLE_GAME_MODIFIERS, + InputAction::DISABLE_GAME_MODIFIERS, "", }, { // TRANSLATORS: input action name N_("On / Off audio"), - Input::KEY_CHANGE_AUDIO, + InputAction::CHANGE_AUDIO, "", }, { // TRANSLATORS: input action name N_("Enable / Disable away mode"), - Input::KEY_AWAY, + InputAction::AWAY, "", }, { // TRANSLATORS: input action name N_("Emulate right click from keyboard"), - Input::KEY_RIGHT_CLICK, + InputAction::RIGHT_CLICK, "", }, { // TRANSLATORS: input action name N_("Toggle camera mode"), - Input::KEY_CAMERA, + InputAction::CAMERA, "", }, { // TRANSLATORS: input action name N_("Show onscreen keyboard"), - Input::KEY_SHOW_KEYBOARD, + InputAction::SHOW_KEYBOARD, "", }, { "", - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" } }; @@ -1493,336 +1494,336 @@ static SetupActionData setupActionData7[] = { // TRANSLATORS: input action name N_("Move Keys"), - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "", }, { // TRANSLATORS: input action name N_("Move Up"), - Input::KEY_MOVE_UP, + InputAction::MOVE_UP, "", }, { // TRANSLATORS: input action name N_("Move Down"), - Input::KEY_MOVE_DOWN, + InputAction::MOVE_DOWN, "", }, { // TRANSLATORS: input action name N_("Move Left"), - Input::KEY_MOVE_LEFT, + InputAction::MOVE_LEFT, "", }, { // TRANSLATORS: input action name N_("Move Right"), - Input::KEY_MOVE_RIGHT, + InputAction::MOVE_RIGHT, "", }, { // TRANSLATORS: input action name N_("Move Forward"), - Input::KEY_MOVE_FORWARD, + InputAction::MOVE_FORWARD, "", }, { // TRANSLATORS: input action name N_("Move to navigation point shortcuts"), - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 1), - Input::KEY_MOVE_TO_POINT_1, + InputAction::MOVE_TO_POINT_1, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 2), - Input::KEY_MOVE_TO_POINT_2, + InputAction::MOVE_TO_POINT_2, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 3), - Input::KEY_MOVE_TO_POINT_3, + InputAction::MOVE_TO_POINT_3, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 4), - Input::KEY_MOVE_TO_POINT_4, + InputAction::MOVE_TO_POINT_4, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 5), - Input::KEY_MOVE_TO_POINT_5, + InputAction::MOVE_TO_POINT_5, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 6), - Input::KEY_MOVE_TO_POINT_6, + InputAction::MOVE_TO_POINT_6, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 7), - Input::KEY_MOVE_TO_POINT_7, + InputAction::MOVE_TO_POINT_7, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 8), - Input::KEY_MOVE_TO_POINT_8, + InputAction::MOVE_TO_POINT_8, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 9), - Input::KEY_MOVE_TO_POINT_9, + InputAction::MOVE_TO_POINT_9, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 10), - Input::KEY_MOVE_TO_POINT_10, + InputAction::MOVE_TO_POINT_10, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 11), - Input::KEY_MOVE_TO_POINT_11, + InputAction::MOVE_TO_POINT_11, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 12), - Input::KEY_MOVE_TO_POINT_12, + InputAction::MOVE_TO_POINT_12, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 13), - Input::KEY_MOVE_TO_POINT_13, + InputAction::MOVE_TO_POINT_13, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 14), - Input::KEY_MOVE_TO_POINT_14, + InputAction::MOVE_TO_POINT_14, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 15), - Input::KEY_MOVE_TO_POINT_15, + InputAction::MOVE_TO_POINT_15, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 16), - Input::KEY_MOVE_TO_POINT_16, + InputAction::MOVE_TO_POINT_16, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 17), - Input::KEY_MOVE_TO_POINT_17, + InputAction::MOVE_TO_POINT_17, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 18), - Input::KEY_MOVE_TO_POINT_18, + InputAction::MOVE_TO_POINT_18, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 19), - Input::KEY_MOVE_TO_POINT_19, + InputAction::MOVE_TO_POINT_19, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 20), - Input::KEY_MOVE_TO_POINT_20, + InputAction::MOVE_TO_POINT_20, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 21), - Input::KEY_MOVE_TO_POINT_21, + InputAction::MOVE_TO_POINT_21, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 22), - Input::KEY_MOVE_TO_POINT_22, + InputAction::MOVE_TO_POINT_22, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 23), - Input::KEY_MOVE_TO_POINT_23, + InputAction::MOVE_TO_POINT_23, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 24), - Input::KEY_MOVE_TO_POINT_24, + InputAction::MOVE_TO_POINT_24, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 25), - Input::KEY_MOVE_TO_POINT_25, + InputAction::MOVE_TO_POINT_25, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 26), - Input::KEY_MOVE_TO_POINT_26, + InputAction::MOVE_TO_POINT_26, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 27), - Input::KEY_MOVE_TO_POINT_27, + InputAction::MOVE_TO_POINT_27, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 28), - Input::KEY_MOVE_TO_POINT_28, + InputAction::MOVE_TO_POINT_28, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 29), - Input::KEY_MOVE_TO_POINT_29, + InputAction::MOVE_TO_POINT_29, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 30), - Input::KEY_MOVE_TO_POINT_30, + InputAction::MOVE_TO_POINT_30, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 31), - Input::KEY_MOVE_TO_POINT_31, + InputAction::MOVE_TO_POINT_31, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 32), - Input::KEY_MOVE_TO_POINT_32, + InputAction::MOVE_TO_POINT_32, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 33), - Input::KEY_MOVE_TO_POINT_33, + InputAction::MOVE_TO_POINT_33, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 34), - Input::KEY_MOVE_TO_POINT_34, + InputAction::MOVE_TO_POINT_34, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 35), - Input::KEY_MOVE_TO_POINT_35, + InputAction::MOVE_TO_POINT_35, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 36), - Input::KEY_MOVE_TO_POINT_36, + InputAction::MOVE_TO_POINT_36, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 37), - Input::KEY_MOVE_TO_POINT_37, + InputAction::MOVE_TO_POINT_37, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 38), - Input::KEY_MOVE_TO_POINT_38, + InputAction::MOVE_TO_POINT_38, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 39), - Input::KEY_MOVE_TO_POINT_39, + InputAction::MOVE_TO_POINT_39, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 40), - Input::KEY_MOVE_TO_POINT_40, + InputAction::MOVE_TO_POINT_40, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 41), - Input::KEY_MOVE_TO_POINT_41, + InputAction::MOVE_TO_POINT_41, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 42), - Input::KEY_MOVE_TO_POINT_42, + InputAction::MOVE_TO_POINT_42, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 43), - Input::KEY_MOVE_TO_POINT_43, + InputAction::MOVE_TO_POINT_43, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 44), - Input::KEY_MOVE_TO_POINT_44, + InputAction::MOVE_TO_POINT_44, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 45), - Input::KEY_MOVE_TO_POINT_45, + InputAction::MOVE_TO_POINT_45, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 46), - Input::KEY_MOVE_TO_POINT_46, + InputAction::MOVE_TO_POINT_46, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 47), - Input::KEY_MOVE_TO_POINT_47, + InputAction::MOVE_TO_POINT_47, "", }, { // TRANSLATORS: input action name strprintf(N_("Move to point Shortcut %d"), 48), - Input::KEY_MOVE_TO_POINT_48, + InputAction::MOVE_TO_POINT_48, "", }, { "", - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" } }; @@ -1832,170 +1833,170 @@ static SetupActionData setupActionData8[] = { // TRANSLATORS: input action name N_("Move & selection"), - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "", }, { // TRANSLATORS: input action name N_("Move Up"), - Input::KEY_GUI_UP, + InputAction::GUI_UP, "", }, { // TRANSLATORS: input action name N_("Move Down"), - Input::KEY_GUI_DOWN, + InputAction::GUI_DOWN, "", }, { // TRANSLATORS: input action name N_("Move Left"), - Input::KEY_GUI_LEFT, + InputAction::GUI_LEFT, "", }, { // TRANSLATORS: input action name N_("Move Right"), - Input::KEY_GUI_RIGHT, + InputAction::GUI_RIGHT, "", }, { // TRANSLATORS: input action name N_("Move Home"), - Input::KEY_GUI_HOME, + InputAction::GUI_HOME, "", }, { // TRANSLATORS: input action name N_("Move End"), - Input::KEY_GUI_END, + InputAction::GUI_END, "", }, { // TRANSLATORS: input action name N_("Page up"), - Input::KEY_GUI_PAGE_UP, + InputAction::GUI_PAGE_UP, "", }, { // TRANSLATORS: input action name N_("Page down"), - Input::KEY_GUI_PAGE_DOWN, + InputAction::GUI_PAGE_DOWN, "", }, { // TRANSLATORS: input action name N_("Other"), - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "", }, { // TRANSLATORS: input action name N_("Select"), - Input::KEY_GUI_SELECT, + InputAction::GUI_SELECT, "", }, { // TRANSLATORS: input action name N_("Select2"), - Input::KEY_GUI_SELECT2, + InputAction::GUI_SELECT2, "", }, { // TRANSLATORS: input action name N_("Cancel"), - Input::KEY_GUI_CANCEL, + InputAction::GUI_CANCEL, "", }, { // TRANSLATORS: input action name N_("Delete"), - Input::KEY_GUI_DELETE, + InputAction::GUI_DELETE, "", }, { // TRANSLATORS: input action name N_("Backspace"), - Input::KEY_GUI_BACKSPACE, + InputAction::GUI_BACKSPACE, "", }, { // TRANSLATORS: input action name N_("Insert"), - Input::KEY_GUI_INSERT, + InputAction::GUI_INSERT, "", }, { // TRANSLATORS: input action name N_("Tab"), - Input::KEY_GUI_TAB, + InputAction::GUI_TAB, "", }, { // TRANSLATORS: input action name N_("Mod"), - Input::KEY_GUI_MOD, + InputAction::GUI_MOD, "", }, { // TRANSLATORS: input action name N_("Ctrl"), - Input::KEY_GUI_CTRL, + InputAction::GUI_CTRL, "", }, { "B", - Input::KEY_GUI_B, + InputAction::GUI_B, "", }, { "C", - Input::KEY_GUI_C, + InputAction::GUI_C, "", }, { "D", - Input::KEY_GUI_D, + InputAction::GUI_D, "", }, { "E", - Input::KEY_GUI_E, + InputAction::GUI_E, "", }, { "F", - Input::KEY_GUI_F, + InputAction::GUI_F, "", }, { "H", - Input::KEY_GUI_H, + InputAction::GUI_H, "", }, { "K", - Input::KEY_GUI_K, + InputAction::GUI_K, "", }, { "U", - Input::KEY_GUI_U, + InputAction::GUI_U, "", }, { "V", - Input::KEY_GUI_V, + InputAction::GUI_V, "", }, { "W", - Input::KEY_GUI_W, + InputAction::GUI_W, "", }, { "", - Input::KEY_NO_VALUE, + InputAction::NO_VALUE, "" } }; diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 89bf2fcd2..b6d805b11 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -441,19 +441,19 @@ bool Viewport::leftMouseAction() { if (player_node->withinAttackRange(mHoverBeing) || inputManager.isActionActive(static_cast<int>( - Input::KEY_ATTACK))) + InputAction::ATTACK))) { validateSpeed(); if (!mStatsReUpdated && player_node != mHoverBeing) { player_node->attack(mHoverBeing, !inputManager.isActionActive( - static_cast<int>(Input::KEY_STOP_ATTACK))); + static_cast<int>(InputAction::STOP_ATTACK))); return true; } } else if (!inputManager.isActionActive(static_cast<int>( - Input::KEY_ATTACK))) + InputAction::ATTACK))) { validateSpeed(); if (!mStatsReUpdated && player_node != mHoverBeing) @@ -473,7 +473,7 @@ bool Viewport::leftMouseAction() } // Just walk around else if (!inputManager.isActionActive(static_cast<int>( - Input::KEY_ATTACK))) + InputAction::ATTACK))) { validateSpeed(); player_node->stopAttack(); @@ -552,8 +552,8 @@ void Viewport::walkByMouse(const MouseEvent &event) if (!mMap || !player_node) return; if (mPlayerFollowMouse - && !inputManager.isActionActive(Input::KEY_STOP_ATTACK) - && !inputManager.isActionActive(Input::KEY_UNTARGET)) + && !inputManager.isActionActive(InputAction::STOP_ATTACK) + && !inputManager.isActionActive(InputAction::UNTARGET)) { if (!mMouseDirectionMove) mPlayerFollowMouse = false; @@ -1088,8 +1088,8 @@ void Viewport::returnCamera() void Viewport::validateSpeed() { if (!inputManager.isActionActive(static_cast<int>( - Input::KEY_TARGET_ATTACK)) && !inputManager.isActionActive( - static_cast<int>(Input::KEY_ATTACK))) + InputAction::TARGET_ATTACK)) && !inputManager.isActionActive( + static_cast<int>(InputAction::ATTACK))) { if (Game::instance()) Game::instance()->setValidSpeed(); diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index 3b3c97911..661dfc66d 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -70,6 +70,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "resources/image.h" @@ -674,7 +675,7 @@ void Button::keyPressed(KeyEvent& event) { const int action = event.getActionId(); - if (action == Input::KEY_GUI_SELECT) + if (action == InputAction::GUI_SELECT) { mKeyPressed = true; event.consume(); @@ -685,7 +686,7 @@ void Button::keyReleased(KeyEvent& event) { const int action = event.getActionId(); - if (action == Input::KEY_GUI_SELECT && mKeyPressed) + if (action == InputAction::GUI_SELECT && mKeyPressed) { mKeyPressed = false; if (mStick) diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp index b9d74e067..48f603532 100644 --- a/src/gui/widgets/checkbox.cpp +++ b/src/gui/widgets/checkbox.cpp @@ -67,6 +67,7 @@ #include "client.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "resources/image.h" @@ -241,7 +242,7 @@ void CheckBox::keyPressed(KeyEvent& event) { const int action = event.getActionId(); - if (action == Input::KEY_GUI_SELECT) + if (action == InputAction::GUI_SELECT) { toggleSelected(); event.consume(); diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp index a1158a59b..0a0b98b4c 100644 --- a/src/gui/widgets/desktop.cpp +++ b/src/gui/widgets/desktop.cpp @@ -209,5 +209,5 @@ void Desktop::setBestFittingWallpaper() void Desktop::handleLink(const std::string &link, MouseEvent *event A_UNUSED) { if (link == "copyright") - inputManager.executeAction(Input::KEY_WINDOW_ABOUT); + inputManager.executeAction(InputAction::WINDOW_ABOUT); } diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index 65a5b10c9..71e546faa 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -26,6 +26,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "gui/gui.h" @@ -317,24 +318,24 @@ void DropDown::keyPressed(KeyEvent& event) const int actionId = event.getActionId(); switch (actionId) { - case Input::KEY_GUI_SELECT: - case Input::KEY_GUI_SELECT2: + case InputAction::GUI_SELECT: + case InputAction::GUI_SELECT2: dropDown(); break; - case Input::KEY_GUI_UP: + case InputAction::GUI_UP: setSelected(getSelected() - 1); break; - case Input::KEY_GUI_DOWN: + case InputAction::GUI_DOWN: setSelected(getSelected() + 1); break; - case Input::KEY_GUI_HOME: + case InputAction::GUI_HOME: setSelected(0); break; - case Input::KEY_GUI_END: + case InputAction::GUI_END: if (mPopup->getListModel()) { setSelected(mPopup->getListModel()-> diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp index 9d9aa8d92..79a4021a4 100644 --- a/src/gui/widgets/emoteshortcutcontainer.cpp +++ b/src/gui/widgets/emoteshortcutcontainer.cpp @@ -125,7 +125,7 @@ void EmoteShortcutContainer::draw(Graphics *graphics) // Draw emote keyboard shortcut. const std::string key = inputManager.getKeyValueString( - Input::KEY_EMOTE_1 + i); + InputAction::EMOTE_1 + i); font->drawString(graphics, key, emoteX + 2, emoteY + 2); } diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp index 9aa17c512..ba2c36713 100644 --- a/src/gui/widgets/guitable.cpp +++ b/src/gui/widgets/guitable.cpp @@ -28,6 +28,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "listeners/guitableactionlistener.h" @@ -370,38 +371,38 @@ void GuiTable::keyPressed(KeyEvent& event) { const int action = event.getActionId(); - if (action == Input::KEY_GUI_SELECT) + if (action == InputAction::GUI_SELECT) { distributeActionEvent(); event.consume(); } - else if (action == Input::KEY_GUI_UP) + else if (action == InputAction::GUI_UP) { setSelectedRow(mSelectedRow - 1); event.consume(); } - else if (action == Input::KEY_GUI_DOWN) + else if (action == InputAction::GUI_DOWN) { setSelectedRow(mSelectedRow + 1); event.consume(); } - else if (action == Input::KEY_GUI_LEFT) + else if (action == InputAction::GUI_LEFT) { setSelectedColumn(mSelectedColumn - 1); event.consume(); } - else if (action == Input::KEY_GUI_RIGHT) + else if (action == InputAction::GUI_RIGHT) { setSelectedColumn(mSelectedColumn + 1); event.consume(); } - else if (action == Input::KEY_GUI_HOME) + else if (action == InputAction::GUI_HOME) { setSelectedRow(0); setSelectedColumn(0); event.consume(); } - else if (action == Input::KEY_GUI_END && mModel) + else if (action == InputAction::GUI_END && mModel) { setSelectedRow(mModel->getRows() - 1); setSelectedColumn(mModel->getColumns() - 1); diff --git a/src/gui/widgets/inttextfield.cpp b/src/gui/widgets/inttextfield.cpp index 160cfe5de..fcec92a39 100644 --- a/src/gui/widgets/inttextfield.cpp +++ b/src/gui/widgets/inttextfield.cpp @@ -28,6 +28,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "utils/stringutils.h" @@ -57,7 +58,8 @@ void IntTextField::keyPressed(KeyEvent &event) { const int action = event.getActionId(); - if (action == Input::KEY_GUI_DELETE || action == Input::KEY_GUI_BACKSPACE) + if (action == InputAction::GUI_DELETE + || action == InputAction::GUI_BACKSPACE) { setText(std::string()); if (mSendAlwaysEvents) diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp index a993afcd0..4cf0e76f7 100644 --- a/src/gui/widgets/itemshortcutcontainer.cpp +++ b/src/gui/widgets/itemshortcutcontainer.cpp @@ -149,7 +149,7 @@ void ItemShortcutContainer::draw(Graphics *graphics) // Draw item keyboard shortcut. const std::string key = inputManager.getKeyValueString( - Input::KEY_SHORTCUT_1 + i); + InputAction::SHORTCUT_1 + i); graphics->setColorAll(mForegroundColor, mForegroundColor); font->drawString(graphics, key, itemX + 2, itemY + 2); diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp index ceb3c1669..ab5e8dccb 100644 --- a/src/gui/widgets/listbox.cpp +++ b/src/gui/widgets/listbox.cpp @@ -67,6 +67,7 @@ #include "client.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "listeners/selectionlistener.h" @@ -230,12 +231,12 @@ void ListBox::draw(Graphics *graphics) void ListBox::keyPressed(KeyEvent &event) { const int action = event.getActionId(); - if (action == Input::KEY_GUI_SELECT) + if (action == InputAction::GUI_SELECT) { distributeActionEvent(); event.consume(); } - else if (action == Input::KEY_GUI_UP) + else if (action == InputAction::GUI_UP) { if (mSelected > 0) setSelected(mSelected - 1); @@ -243,7 +244,7 @@ void ListBox::keyPressed(KeyEvent &event) setSelected(getListModel()->getNumberOfElements() - 1); event.consume(); } - else if (action == Input::KEY_GUI_DOWN) + else if (action == InputAction::GUI_DOWN) { const int num = getListModel()->getNumberOfElements() - 1; if (mSelected < num) @@ -252,12 +253,12 @@ void ListBox::keyPressed(KeyEvent &event) setSelected(0); event.consume(); } - else if (action == Input::KEY_GUI_HOME) + else if (action == InputAction::GUI_HOME) { setSelected(0); event.consume(); } - else if (action == Input::KEY_GUI_END && getListModel()) + else if (action == InputAction::GUI_END && getListModel()) { setSelected(getListModel()->getNumberOfElements() - 1); event.consume(); diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp index ad1b5d902..87621e945 100644 --- a/src/gui/widgets/radiobutton.cpp +++ b/src/gui/widgets/radiobutton.cpp @@ -67,6 +67,7 @@ #include "client.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "resources/image.h" @@ -240,7 +241,7 @@ void RadioButton::mouseExited(MouseEvent& event A_UNUSED) void RadioButton::keyPressed(KeyEvent& event) { const int action = event.getActionId(); - if (action == Input::KEY_GUI_SELECT) + if (action == InputAction::GUI_SELECT) { setSelected(true); distributeActionEvent(); diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp index 77ae38931..848027c94 100644 --- a/src/gui/widgets/slider.cpp +++ b/src/gui/widgets/slider.cpp @@ -70,6 +70,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "gui/gui.h" @@ -409,13 +410,13 @@ void Slider::keyPressed(KeyEvent& event) if (mOrientation == HORIZONTAL) { - if (action == Input::KEY_GUI_RIGHT) + if (action == InputAction::GUI_RIGHT) { setValue(mValue + mStepLength); distributeActionEvent(); event.consume(); } - else if (action == Input::KEY_GUI_LEFT) + else if (action == InputAction::GUI_LEFT) { setValue(mValue - mStepLength); distributeActionEvent(); @@ -424,13 +425,13 @@ void Slider::keyPressed(KeyEvent& event) } else { - if (action == Input::KEY_GUI_UP) + if (action == InputAction::GUI_UP) { setValue(mValue + mStepLength); distributeActionEvent(); event.consume(); } - else if (action == Input::KEY_GUI_DOWN) + else if (action == InputAction::GUI_DOWN) { setValue(mValue - mStepLength); distributeActionEvent(); diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index f99f6ccc8..81cf34dd2 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -67,6 +67,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "gui/gui.h" @@ -728,7 +729,7 @@ void TabbedArea::keyPressed(KeyEvent& event) const int actionId = event.getActionId(); - if (actionId == Input::KEY_GUI_LEFT) + if (actionId == InputAction::GUI_LEFT) { int index = getSelectedTabIndex(); index--; @@ -740,7 +741,7 @@ void TabbedArea::keyPressed(KeyEvent& event) event.consume(); } - else if (actionId == Input::KEY_GUI_RIGHT) + else if (actionId == InputAction::GUI_RIGHT) { int index = getSelectedTabIndex(); index++; diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp index 4fae66b47..97aa7421f 100644 --- a/src/gui/widgets/tabs/setup_input.cpp +++ b/src/gui/widgets/tabs/setup_input.cpp @@ -177,7 +177,7 @@ void Setup_Input::action(const ActionEvent &event) if (i >= 0 && i < mActionDataSize[selectedData]) { if (setupActionData[selectedData][i].actionId - == static_cast<int>(Input::KEY_NO_VALUE)) + == static_cast<int>(InputAction::NO_VALUE)) { mAssignKeyButton->setEnabled(false); mUnassignKeyButton->setEnabled(false); @@ -215,7 +215,7 @@ void Setup_Input::action(const ActionEvent &event) inputManager.setNewKeyIndex(ik); refreshAssignedKey(mKeyList->getSelected()); inputManager.unassignKey(); - inputManager.setNewKeyIndex(static_cast<int>(Input::KEY_NO_VALUE)); + inputManager.setNewKeyIndex(static_cast<int>(InputAction::NO_VALUE)); } mAssignKeyButton->setEnabled(true); } @@ -260,7 +260,7 @@ void Setup_Input::refreshAssignedKey(const int index) { const int selectedData = mKeyListModel->getSelectedData(); const SetupActionData &key = setupActionData[selectedData][index]; - if (key.actionId == static_cast<int>(Input::KEY_NO_VALUE)) + if (key.actionId == static_cast<int>(InputAction::NO_VALUE)) { const std::string str(" \342\200\225\342\200\225\342\200\225" "\342\200\225\342\200\225 "); @@ -328,7 +328,7 @@ void Setup_Input::keyUnresolved() if (mKeySetting) { newKeyCallback(inputManager.getNewKeyIndex()); - inputManager.setNewKeyIndex(static_cast<int>(Input::KEY_NO_VALUE)); + inputManager.setNewKeyIndex(static_cast<int>(InputAction::NO_VALUE)); } } @@ -355,17 +355,17 @@ void Setup_Input::fixTranslation(SetupActionData *const actionDatas, void Setup_Input::fixTranslations() { - fixTranslation(setupActionData1, static_cast<int>(Input::KEY_SHORTCUT_1), - static_cast<int>(Input::KEY_SHORTCUT_20), "Item Shortcut %d"); + fixTranslation(setupActionData1, static_cast<int>(InputAction::SHORTCUT_1), + static_cast<int>(InputAction::SHORTCUT_20), "Item Shortcut %d"); - fixTranslation(setupActionData3, static_cast<int>(Input::KEY_EMOTE_1), - static_cast<int>(Input::KEY_EMOTE_48), "Emote Shortcut %d"); + fixTranslation(setupActionData3, static_cast<int>(InputAction::EMOTE_1), + static_cast<int>(InputAction::EMOTE_48), "Emote Shortcut %d"); - fixTranslation(setupActionData4, static_cast<int>(Input::KEY_OUTFIT_1), - static_cast<int>(Input::KEY_OUTFIT_48), "Outfit Shortcut %d"); + fixTranslation(setupActionData4, static_cast<int>(InputAction::OUTFIT_1), + static_cast<int>(InputAction::OUTFIT_48), "Outfit Shortcut %d"); fixTranslation(setupActionData7, static_cast<int>( - Input::KEY_MOVE_TO_POINT_1), - static_cast<int>(Input::KEY_MOVE_TO_POINT_48), + InputAction::MOVE_TO_POINT_1), + static_cast<int>(InputAction::MOVE_TO_POINT_48), "Move to point Shortcut %d"); } diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp index 917c613c5..23fa63a07 100644 --- a/src/gui/widgets/textbox.cpp +++ b/src/gui/widgets/textbox.cpp @@ -65,6 +65,7 @@ #include "gui/widgets/textbox.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "gui/gui.h" @@ -256,7 +257,7 @@ void TextBox::keyPressed(KeyEvent& event) switch (action) { - case Input::KEY_GUI_LEFT: + case InputAction::GUI_LEFT: { --mCaretColumn; if (mCaretColumn < 0) @@ -277,7 +278,7 @@ void TextBox::keyPressed(KeyEvent& event) break; } - case Input::KEY_GUI_RIGHT: + case InputAction::GUI_RIGHT: { ++mCaretColumn; if (mCaretColumn > static_cast<int>(mTextRows[mCaretRow].size())) @@ -302,28 +303,28 @@ void TextBox::keyPressed(KeyEvent& event) break; } - case Input::KEY_GUI_DOWN: + case InputAction::GUI_DOWN: { setCaretRow(mCaretRow + 1); break; } - case Input::KEY_GUI_UP: + case InputAction::GUI_UP: { setCaretRow(mCaretRow - 1); break; } - case Input::KEY_GUI_HOME: + case InputAction::GUI_HOME: { mCaretColumn = 0; break; } - case Input::KEY_GUI_END: + case InputAction::GUI_END: { mCaretColumn = static_cast<int>(mTextRows[mCaretRow].size()); break; } - case Input::KEY_GUI_SELECT2: + case InputAction::GUI_SELECT2: { if (mEditable) { @@ -337,7 +338,7 @@ void TextBox::keyPressed(KeyEvent& event) break; } - case Input::KEY_GUI_BACKSPACE: + case InputAction::GUI_BACKSPACE: { if (mCaretColumn != 0 && mEditable) { @@ -355,7 +356,7 @@ void TextBox::keyPressed(KeyEvent& event) break; } - case Input::KEY_GUI_DELETE: + case InputAction::GUI_DELETE: { if (mCaretColumn < static_cast<int>( mTextRows[mCaretRow].size()) && mEditable) @@ -373,7 +374,7 @@ void TextBox::keyPressed(KeyEvent& event) break; } - case Input::KEY_GUI_PAGE_UP: + case InputAction::GUI_PAGE_UP: { Widget *const par = getParent(); @@ -389,7 +390,7 @@ void TextBox::keyPressed(KeyEvent& event) break; } - case Input::KEY_GUI_PAGE_DOWN: + case InputAction::GUI_PAGE_DOWN: { Widget *const par = getParent(); @@ -406,7 +407,7 @@ void TextBox::keyPressed(KeyEvent& event) break; } - case Input::KEY_GUI_TAB: + case InputAction::GUI_TAB: { if (mEditable) { diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index 7aec5e4fc..14faad2f0 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -327,7 +327,7 @@ void TextField::keyPressed(KeyEvent &event) const int action = event.getActionId(); if (!inputManager.isActionActive(static_cast<int>( - Input::KEY_GUI_CTRL))) + InputAction::GUI_CTRL))) { if (!handleNormalKeys(action, consumed)) { @@ -353,7 +353,7 @@ bool TextField::handleNormalKeys(const int action, bool &consumed) { switch (action) { - case Input::KEY_GUI_LEFT: + case InputAction::GUI_LEFT: { consumed = true; while (mCaretPosition > 0) @@ -365,7 +365,7 @@ bool TextField::handleNormalKeys(const int action, bool &consumed) break; } - case Input::KEY_GUI_RIGHT: + case InputAction::GUI_RIGHT: { consumed = true; const unsigned sz = static_cast<unsigned>(mText.size()); @@ -381,7 +381,7 @@ bool TextField::handleNormalKeys(const int action, bool &consumed) break; } - case Input::KEY_GUI_DELETE: + case InputAction::GUI_DELETE: { consumed = true; unsigned sz = static_cast<unsigned>(mText.size()); @@ -398,28 +398,28 @@ bool TextField::handleNormalKeys(const int action, bool &consumed) break; } - case Input::KEY_GUI_BACKSPACE: + case InputAction::GUI_BACKSPACE: consumed = true; deleteCharLeft(mText, &mCaretPosition); break; - case Input::KEY_GUI_SELECT2: + case InputAction::GUI_SELECT2: distributeActionEvent(); consumed = true; fixScroll(); return false; - case Input::KEY_GUI_HOME: + case InputAction::GUI_HOME: mCaretPosition = 0; consumed = true; break; - case Input::KEY_GUI_END: + case InputAction::GUI_END: mCaretPosition = static_cast<unsigned>(mText.size()); consumed = true; break; - case Input::KEY_GUI_TAB: + case InputAction::GUI_TAB: if (mLoseFocusOnTab) return false; consumed = true; @@ -435,19 +435,19 @@ void TextField::handleCtrlKeys(const int action, bool &consumed) { switch (action) { - case Input::KEY_GUI_LEFT: + case InputAction::GUI_LEFT: { moveCaretWordBack(); consumed = true; break; } - case Input::KEY_GUI_RIGHT: + case InputAction::GUI_RIGHT: { moveCaretWordForward(); consumed = true; break; } - case Input::KEY_GUI_B: + case InputAction::GUI_B: { if (mAllowSpecialActions) { @@ -456,49 +456,49 @@ void TextField::handleCtrlKeys(const int action, bool &consumed) } break; } - case Input::KEY_GUI_F: + case InputAction::GUI_F: { moveCaretForward(); consumed = true; break; } - case Input::KEY_GUI_D: + case InputAction::GUI_D: { caretDelete(); consumed = true; break; } - case Input::KEY_GUI_E: + case InputAction::GUI_E: { mCaretPosition = static_cast<int>(mText.size()); consumed = true; break; } - case Input::KEY_GUI_H: + case InputAction::GUI_H: { deleteCharLeft(mText, &mCaretPosition); consumed = true; break; } - case Input::KEY_GUI_K: + case InputAction::GUI_K: { mText = mText.substr(0, mCaretPosition); consumed = true; break; } - case Input::KEY_GUI_U: + case InputAction::GUI_U: { caretDeleteToStart(); consumed = true; break; } - case Input::KEY_GUI_C: + case InputAction::GUI_C: { handleCopy(); consumed = true; break; } - case Input::KEY_GUI_V: + case InputAction::GUI_V: { #ifdef USE_SDL2 handlePaste(); @@ -512,7 +512,7 @@ void TextField::handleCtrlKeys(const int action, bool &consumed) consumed = true; break; } - case Input::KEY_GUI_W: + case InputAction::GUI_W: { caretDeleteWord(); consumed = true; @@ -699,7 +699,7 @@ void TextField::mousePressed(MouseEvent &event) { #ifdef ANDROID if (!client->isKeyboardVisible()) - inputManager.executeAction(Input::KEY_SHOW_KEYBOARD); + inputManager.executeAction(InputAction::SHOW_KEYBOARD); #endif event.consume(); if (event.getButton() == MouseButton::RIGHT) @@ -736,7 +736,7 @@ void TextField::focusGained(const Event &event A_UNUSED) { #ifdef ANDROID if (!client->isKeyboardVisible()) - inputManager.executeAction(Input::KEY_SHOW_KEYBOARD); + inputManager.executeAction(InputAction::SHOW_KEYBOARD); #endif } diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp index cb8e0c84d..b30306c3f 100644 --- a/src/gui/windowmenu.cpp +++ b/src/gui/windowmenu.cpp @@ -68,24 +68,24 @@ WindowMenu::WindowMenu(const Widget2 *const widget) : setFocusable(false); // TRANSLATORS: short button name for who is online window. addButton(N_("ONL"), - _("Who is online"), x, h, Input::KEY_WINDOW_ONLINE); + _("Who is online"), x, h, InputAction::WINDOW_ONLINE); // TRANSLATORS: short button name for help window. addButton(N_("HLP"), - _("Help"), x, h, Input::KEY_WINDOW_HELP); + _("Help"), x, h, InputAction::WINDOW_HELP); // TRANSLATORS: short button name for quests window. addButton(N_("QE"), - _("Quests"), x, h, Input::KEY_WINDOW_QUESTS); + _("Quests"), x, h, InputAction::WINDOW_QUESTS); // TRANSLATORS: short button name for bot checker window. addButton(N_("BC"), - _("Bot checker"), x, h, Input::KEY_WINDOW_BOT_CHECKER, false); + _("Bot checker"), x, h, InputAction::WINDOW_BOT_CHECKER, false); // TRANSLATORS: short button name for kill stats window. addButton(N_("KS"), - _("Kill stats"), x, h, Input::KEY_WINDOW_KILLS); + _("Kill stats"), x, h, InputAction::WINDOW_KILLS); addButton(":-)", - _("Smilies"), x, h, Input::KEY_WINDOW_EMOTE_SHORTCUT); + _("Smilies"), x, h, InputAction::WINDOW_EMOTE_SHORTCUT); // TRANSLATORS: short button name for chat window. addButton(N_("CH"), - _("Chat"), x, h, Input::KEY_WINDOW_CHAT, + _("Chat"), x, h, InputAction::WINDOW_CHAT, #ifdef ANDROID true); #else @@ -93,56 +93,56 @@ WindowMenu::WindowMenu(const Widget2 *const widget) : #endif // TRANSLATORS: short button name for status window. addButton(N_("STA"), - _("Status"), x, h, Input::KEY_WINDOW_STATUS); + _("Status"), x, h, InputAction::WINDOW_STATUS); // TRANSLATORS: short button name for equipment window. addButton(N_("EQU"), - _("Equipment"), x, h, Input::KEY_WINDOW_EQUIPMENT); + _("Equipment"), x, h, InputAction::WINDOW_EQUIPMENT); // TRANSLATORS: short button name for inventory window. addButton(N_("INV"), - _("Inventory"), x, h, Input::KEY_WINDOW_INVENTORY); + _("Inventory"), x, h, InputAction::WINDOW_INVENTORY); // TRANSLATORS: short button name for map window. addButton(N_("MAP"), - _("Map"), x, h, Input::KEY_WINDOW_MINIMAP, false); + _("Map"), x, h, InputAction::WINDOW_MINIMAP, false); if (skillDialog->hasSkills()) { // TRANSLATORS: short button name for skills window. addButton(N_("SKI"), - _("Skills"), x, h, Input::KEY_WINDOW_SKILL); + _("Skills"), x, h, InputAction::WINDOW_SKILL); } // TRANSLATORS: short button name for social window. addButton(N_("SOC"), // TRANSLATORS: full button name - _("Social"), x, h, Input::KEY_WINDOW_SOCIAL); + _("Social"), x, h, InputAction::WINDOW_SOCIAL); // TRANSLATORS: short button name for shortcuts window. addButton(N_("SH"), // TRANSLATORS: full button name - _("Shortcuts"), x, h, Input::KEY_WINDOW_SHORTCUT); + _("Shortcuts"), x, h, InputAction::WINDOW_SHORTCUT); // TRANSLATORS: short button name for spells window. addButton(N_("SP"), // TRANSLATORS: full button name - _("Spells"), x, h, Input::KEY_WINDOW_SPELLS); + _("Spells"), x, h, InputAction::WINDOW_SPELLS); // TRANSLATORS: short button name for drops window. addButton(N_("DR"), // TRANSLATORS: full button name - _("Drop"), x, h, Input::KEY_WINDOW_DROP, false); + _("Drop"), x, h, InputAction::WINDOW_DROP, false); // TRANSLATORS: short button name for did you know window. addButton(N_("YK"), // TRANSLATORS: full button name - _("Did you know"), x, h, Input::KEY_WINDOW_DIDYOUKNOW, false); + _("Did you know"), x, h, InputAction::WINDOW_DIDYOUKNOW, false); // TRANSLATORS: short button name for shop window. addButton(N_("SHP"), // TRANSLATORS: full button name - _("Shop"), x, h, Input::KEY_WINDOW_SHOP, false); + _("Shop"), x, h, InputAction::WINDOW_SHOP, false); // TRANSLATORS: short button name for outfits window. addButton(N_("OU"), // TRANSLATORS: full button name - _("Outfits"), x, h, Input::KEY_WINDOW_OUTFIT, false); + _("Outfits"), x, h, InputAction::WINDOW_OUTFIT, false); // TRANSLATORS: short button name for debug window. addButton(N_("DBG"), // TRANSLATORS: full button name - _("Debug"), x, h, Input::KEY_WINDOW_DEBUG, + _("Debug"), x, h, InputAction::WINDOW_DEBUG, #ifdef ANDROID true); #else @@ -151,11 +151,11 @@ WindowMenu::WindowMenu(const Widget2 *const widget) : // TRANSLATORS: short button name for windows list menu. addButton(N_("WIN"), // TRANSLATORS: full button name - _("Windows"), x, h, Input::KEY_SHOW_WINDOWS, false); + _("Windows"), x, h, InputAction::SHOW_WINDOWS, false); // TRANSLATORS: short button name for setup window. addButton(N_("SET"), // TRANSLATORS: full button name - _("Setup"), x, h, Input::KEY_WINDOW_SETUP); + _("Setup"), x, h, InputAction::WINDOW_SETUP); x += mPadding - mSpacing; if (mainGraphics) @@ -233,7 +233,7 @@ void WindowMenu::addButton(const char *const text, h = btn->getHeight() + 2 * mPadding; mButtons.push_back(btn); mButtonNames[text] = new ButtonInfo(btn, key, visible); - if (key != Input::KEY_SHOW_WINDOWS) + if (key != InputAction::SHOW_WINDOWS) mButtonTexts.push_back(new ButtonText(description, key)); } @@ -285,7 +285,7 @@ void WindowMenu::mouseMoved(MouseEvent &event) const int y = event.getY(); const int key = btn->getTag(); const Rect &rect = mDimension; - if (key != Input::KEY_NO_VALUE) + if (key != InputAction::NO_VALUE) { mTextPopup->show(x + rect.x, y + rect.y, btn->getDescription(), // TRANSLATORS: short key name diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index cc254bce0..e8f92e343 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -26,6 +26,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "gui/windows/okdialog.h" @@ -665,7 +666,7 @@ void CharCreateDialog::keyPressed(KeyEvent &event) const int actionId = event.getActionId(); switch (actionId) { - case Input::KEY_GUI_CANCEL: + case InputAction::GUI_CANCEL: event.consume(); action(ActionEvent(mCancelButton, mCancelButton->getActionEventId())); diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp index 74a135bab..73ebb90b6 100644 --- a/src/gui/windows/charselectdialog.cpp +++ b/src/gui/windows/charselectdialog.cpp @@ -28,6 +28,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "being/attributes.h" @@ -297,13 +298,13 @@ void CharSelectDialog::keyPressed(KeyEvent &event) const int actionId = event.getActionId(); switch (actionId) { - case Input::KEY_GUI_CANCEL: + case InputAction::GUI_CANCEL: event.consume(); action(ActionEvent(mSwitchLoginButton, mSwitchLoginButton->getActionEventId())); break; - case Input::KEY_GUI_RIGHT: + case InputAction::GUI_RIGHT: { event.consume(); int idx = mCharacterView->getSelected(); @@ -318,7 +319,7 @@ void CharSelectDialog::keyPressed(KeyEvent &event) break; } - case Input::KEY_GUI_LEFT: + case InputAction::GUI_LEFT: { event.consume(); int idx = mCharacterView->getSelected(); @@ -333,7 +334,7 @@ void CharSelectDialog::keyPressed(KeyEvent &event) break; } - case Input::KEY_GUI_UP: + case InputAction::GUI_UP: { event.consume(); int idx = mCharacterView->getSelected(); @@ -348,7 +349,7 @@ void CharSelectDialog::keyPressed(KeyEvent &event) break; } - case Input::KEY_GUI_DOWN: + case InputAction::GUI_DOWN: { event.consume(); int idx = mCharacterView->getSelected(); @@ -363,7 +364,7 @@ void CharSelectDialog::keyPressed(KeyEvent &event) break; } - case Input::KEY_GUI_DELETE: + case InputAction::GUI_DELETE: { event.consume(); const int idx = mCharacterView->getSelected(); @@ -375,7 +376,7 @@ void CharSelectDialog::keyPressed(KeyEvent &event) break; } - case Input::KEY_GUI_SELECT: + case InputAction::GUI_SELECT: { event.consume(); use(mCharacterView->getSelected()); diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 262700fc6..bd0f68453 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -662,7 +662,7 @@ void ChatWindow::mousePressed(MouseEvent &event) { event.consume(); if (inputManager.isActionActive(static_cast<int>( - Input::KEY_CHAT_MOD))) + InputAction::CHAT_MOD))) { ChatTab *const wTab = dynamic_cast<WhisperTab*>(tab); if (wTab) @@ -721,7 +721,7 @@ void ChatWindow::keyPressed(KeyEvent &event) { const int actionId = event.getActionId(); std::string temp; - if (actionId == static_cast<int>(Input::KEY_GUI_DOWN)) + if (actionId == static_cast<int>(InputAction::GUI_DOWN)) { if (mCurHist != mHistory.end()) { @@ -745,7 +745,7 @@ void ChatWindow::keyPressed(KeyEvent &event) mChatInput->setText(""); } } - else if (actionId == static_cast<int>(Input::KEY_GUI_UP) && + else if (actionId == static_cast<int>(InputAction::GUI_UP) && mCurHist != mHistory.begin() && !mHistory.empty()) { // Move backward through the history @@ -754,7 +754,7 @@ void ChatWindow::keyPressed(KeyEvent &event) mChatInput->setCaretPosition(static_cast<unsigned>( mChatInput->getText().length())); } - else if (actionId == static_cast<int>(Input::KEY_GUI_INSERT) && + else if (actionId == static_cast<int>(InputAction::GUI_INSERT) && mChatInput->getText() != "") { // Add the current message to the history and clear the text @@ -763,18 +763,18 @@ void ChatWindow::keyPressed(KeyEvent &event) mCurHist = mHistory.end(); mChatInput->setText(""); } - else if (actionId == static_cast<int>(Input::KEY_GUI_TAB) && + else if (actionId == static_cast<int>(InputAction::GUI_TAB) && !mChatInput->getText().empty()) { autoComplete(); return; } - else if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL) && + else if (actionId == static_cast<int>(InputAction::GUI_CANCEL) && mChatInput->isVisibleLocal()) { mChatInput->processVisible(false); } - else if (actionId == static_cast<int>(Input::KEY_CHAT_PREV_HISTORY) && + else if (actionId == static_cast<int>(InputAction::CHAT_PREV_HISTORY) && mChatInput->isVisibleLocal()) { const ChatTab *const tab = getFocused(); @@ -806,7 +806,7 @@ void ChatWindow::keyPressed(KeyEvent &event) mChatInput->getText().length())); } } - else if (actionId == static_cast<int>(Input::KEY_CHAT_NEXT_HISTORY) && + else if (actionId == static_cast<int>(InputAction::CHAT_NEXT_HISTORY) && mChatInput->isVisibleLocal()) { const ChatTab *const tab = getFocused(); @@ -842,7 +842,7 @@ void ChatWindow::keyPressed(KeyEvent &event) mChatInput->getText().length())); } } - else if (actionId == static_cast<int>(Input::KEY_GUI_F1)) + else if (actionId == static_cast<int>(InputAction::GUI_F1)) { if (emoteWindow) { @@ -852,21 +852,21 @@ void ChatWindow::keyPressed(KeyEvent &event) emoteWindow->show(); } } - ifKey(Input::KEY_GUI_F2, "\u2318") - ifKey(Input::KEY_GUI_F3, "\u263A") - ifKey(Input::KEY_GUI_F4, "\u2665") - ifKey(Input::KEY_GUI_F5, "\u266A") - ifKey(Input::KEY_GUI_F6, "\u266B") - ifKey(Input::KEY_GUI_F7, "\u26A0") - ifKey(Input::KEY_GUI_F8, "\u2622") - ifKey(Input::KEY_GUI_F9, "\u262E") - ifKey(Input::KEY_GUI_F10, "\u2605") - ifKey(Input::KEY_GUI_F11, "\u2618") - ifKey(Input::KEY_GUI_F12, "\u2592") - - if (inputManager.isActionActive(static_cast<int>(Input::KEY_GUI_CTRL))) - { - if (actionId == static_cast<int>(Input::KEY_GUI_B)) + ifKey(InputAction::GUI_F2, "\u2318") + ifKey(InputAction::GUI_F3, "\u263A") + ifKey(InputAction::GUI_F4, "\u2665") + ifKey(InputAction::GUI_F5, "\u266A") + ifKey(InputAction::GUI_F6, "\u266B") + ifKey(InputAction::GUI_F7, "\u26A0") + ifKey(InputAction::GUI_F8, "\u2622") + ifKey(InputAction::GUI_F9, "\u262E") + ifKey(InputAction::GUI_F10, "\u2605") + ifKey(InputAction::GUI_F11, "\u2618") + ifKey(InputAction::GUI_F12, "\u2592") + + if (inputManager.isActionActive(static_cast<int>(InputAction::GUI_CTRL))) + { + if (actionId == static_cast<int>(InputAction::GUI_B)) { std::string inputText = mChatInput->getTextBeforeCaret(); toLower(inputText); diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp index 516efea4d..da0de7026 100644 --- a/src/gui/windows/editserverdialog.cpp +++ b/src/gui/windows/editserverdialog.cpp @@ -23,6 +23,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "gui/models/typelistmodel.h" @@ -256,12 +257,12 @@ void EditServerDialog::keyPressed(KeyEvent &event) const int actionId = event.getActionId(); - if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL)) + if (actionId == static_cast<int>(InputAction::GUI_CANCEL)) { scheduleDelete(); } - else if (actionId == static_cast<int>(Input::KEY_GUI_SELECT) - || actionId == static_cast<int>(Input::KEY_GUI_SELECT2)) + else if (actionId == static_cast<int>(InputAction::GUI_SELECT) + || actionId == static_cast<int>(InputAction::GUI_SELECT2)) { action(ActionEvent(nullptr, mOkButton->getActionEventId())); } diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index ee920f8a1..2049d2a12 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -396,7 +396,7 @@ void InventoryWindow::action(const ActionEvent &event) return; if (inputManager.isActionActive(static_cast<int>( - Input::KEY_STOP_ATTACK))) + InputAction::STOP_ATTACK))) { PlayerInfo::dropItem(item, item->getQuantity(), true); } @@ -445,11 +445,11 @@ void InventoryWindow::mouseClicked(MouseEvent &event) gui->resetClickCount(); const bool mod = (isStorageActive() && inputManager.isActionActive( - static_cast<int>(Input::KEY_STOP_ATTACK))); + static_cast<int>(InputAction::STOP_ATTACK))); const bool mod2 = (tradeWindow && tradeWindow->isWindowVisible() && inputManager.isActionActive(static_cast<int>( - Input::KEY_STOP_ATTACK))); + InputAction::STOP_ATTACK))); if (!mod && !mod2 && event.getButton() == MouseButton::RIGHT) { @@ -584,13 +584,13 @@ void InventoryWindow::mouseExited(MouseEvent &event A_UNUSED) void InventoryWindow::keyPressed(KeyEvent &event) { - if (event.getActionId() == static_cast<int>(Input::KEY_GUI_MOD)) + if (event.getActionId() == static_cast<int>(InputAction::GUI_MOD)) mSplit = true; } void InventoryWindow::keyReleased(KeyEvent &event) { - if (event.getActionId() == static_cast<int>(Input::KEY_GUI_MOD)) + if (event.getActionId() == static_cast<int>(InputAction::GUI_MOD)) mSplit = false; } diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp index 99354f4fb..f03507320 100644 --- a/src/gui/windows/logindialog.cpp +++ b/src/gui/windows/logindialog.cpp @@ -27,6 +27,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "listeners/openurllistener.h" @@ -245,12 +246,12 @@ void LoginDialog::keyPressed(KeyEvent &event) } const int actionId = event.getActionId(); - if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL)) + if (actionId == static_cast<int>(InputAction::GUI_CANCEL)) { action(ActionEvent(nullptr, mServerButton->getActionEventId())); } - else if (actionId == static_cast<int>(Input::KEY_GUI_SELECT) - || actionId == static_cast<int>(Input::KEY_GUI_SELECT2)) + else if (actionId == static_cast<int>(InputAction::GUI_SELECT) + || actionId == static_cast<int>(InputAction::GUI_SELECT2)) { action(ActionEvent(nullptr, mLoginButton->getActionEventId())); } diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp index fb2b4a4e7..f9ac83ada 100644 --- a/src/gui/windows/outfitwindow.cpp +++ b/src/gui/windows/outfitwindow.cpp @@ -529,7 +529,7 @@ std::string OutfitWindow::keyName(const int number) if (number < 0 || number >= SHORTCUT_EMOTES) return ""; return inputManager.getKeyStringLong(static_cast<int>( - Input::KEY_EMOTE_1) + number); + InputAction::EMOTE_1) + number); } void OutfitWindow::next() diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp index e3276fae6..c34801c8e 100644 --- a/src/gui/windows/quitdialog.cpp +++ b/src/gui/windows/quitdialog.cpp @@ -30,6 +30,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "gui/viewport.h" @@ -208,17 +209,17 @@ void QuitDialog::keyPressed(KeyEvent &event) switch (actionId) { - case Input::KEY_GUI_SELECT: - case Input::KEY_GUI_SELECT2: + case InputAction::GUI_SELECT: + case InputAction::GUI_SELECT2: action(ActionEvent(nullptr, mOkButton->getActionEventId())); break; - case Input::KEY_GUI_CANCEL: + case InputAction::GUI_CANCEL: action(ActionEvent(nullptr, mCancelButton->getActionEventId())); break; - case Input::KEY_GUI_UP: + case InputAction::GUI_UP: dir = -1; break; - case Input::KEY_GUI_DOWN: + case InputAction::GUI_DOWN: dir = 1; break; default: diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp index 61b7e0dac..3a906b00e 100644 --- a/src/gui/windows/registerdialog.cpp +++ b/src/gui/windows/registerdialog.cpp @@ -26,6 +26,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "listeners/wrongdatanoticelistener.h" @@ -276,12 +277,12 @@ void RegisterDialog::keyPressed(KeyEvent &event) return; } const int actionId = event.getActionId(); - if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL)) + if (actionId == static_cast<int>(InputAction::GUI_CANCEL)) { action(ActionEvent(nullptr, mCancelButton->getActionEventId())); } - else if (actionId == static_cast<int>(Input::KEY_GUI_SELECT) - || actionId == static_cast<int>(Input::KEY_GUI_SELECT2)) + else if (actionId == static_cast<int>(InputAction::GUI_SELECT) + || actionId == static_cast<int>(InputAction::GUI_SELECT2)) { action(ActionEvent(nullptr, mRegisterButton->getActionEventId())); } diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index 74906dc25..5a0bf0478 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -29,6 +29,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "gui/gui.h" @@ -300,23 +301,23 @@ void ServerDialog::keyPressed(KeyEvent &event) { switch (event.getActionId()) { - case Input::KEY_GUI_CANCEL: + case InputAction::GUI_CANCEL: event.consume(); client->setState(STATE_EXIT); return; - case Input::KEY_GUI_SELECT: - case Input::KEY_GUI_SELECT2: + case InputAction::GUI_SELECT: + case InputAction::GUI_SELECT2: event.consume(); action(ActionEvent(nullptr, mConnectButton->getActionEventId())); return; - case Input::KEY_GUI_INSERT: + case InputAction::GUI_INSERT: (new EditServerDialog(this, ServerInfo(), -1))->postInit(); return; - case Input::KEY_GUI_DELETE: + case InputAction::GUI_DELETE: { const int index = mServersList->getSelected(); if (index >= 0) @@ -328,7 +329,7 @@ void ServerDialog::keyPressed(KeyEvent &event) return; } - case Input::KEY_GUI_BACKSPACE: + case InputAction::GUI_BACKSPACE: { const int index = mServersList->getSelected(); if (index >= 0) diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index 40b8014e2..475144f61 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -27,6 +27,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "gui/widgets/browserbox.h" @@ -302,13 +303,13 @@ void UpdaterWindow::action(const ActionEvent &event) void UpdaterWindow::keyPressed(KeyEvent &event) { const int actionId = event.getActionId(); - if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL)) + if (actionId == static_cast<int>(InputAction::GUI_CANCEL)) { action(ActionEvent(nullptr, mCancelButton->getActionEventId())); client->setState(STATE_LOGIN); } - else if (actionId == static_cast<int>(Input::KEY_GUI_SELECT) - || actionId == static_cast<int>(Input::KEY_GUI_SELECT2)) + else if (actionId == static_cast<int>(InputAction::GUI_SELECT) + || actionId == static_cast<int>(InputAction::GUI_SELECT2)) { if (mDownloadStatus == UPDATE_COMPLETE || mDownloadStatus == UPDATE_ERROR) diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp index 4a70e3750..f81f14399 100644 --- a/src/gui/windows/worldselectdialog.cpp +++ b/src/gui/windows/worldselectdialog.cpp @@ -26,6 +26,7 @@ #include "events/keyevent.h" +#include "input/inputaction.h" #include "input/keydata.h" #include "gui/widgets/button.h" @@ -123,13 +124,13 @@ void WorldSelectDialog::keyPressed(KeyEvent &event) { const int actionId = event.getActionId(); - if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL)) + if (actionId == static_cast<int>(InputAction::GUI_CANCEL)) { action(ActionEvent(nullptr, mChangeLoginButton->getActionEventId())); } - else if (actionId == static_cast<int>(Input::KEY_GUI_SELECT) - || actionId == static_cast<int>(Input::KEY_GUI_SELECT2)) + else if (actionId == static_cast<int>(InputAction::GUI_SELECT) + || actionId == static_cast<int>(InputAction::GUI_SELECT2)) { action(ActionEvent(nullptr, mChooseWorld->getActionEventId())); } |