From 7da95c7f4da447876458a0b1a17736b9a2865844 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 18 May 2014 19:47:28 +0300 Subject: Move inputaction into separate file. --- src/gui/widgets/tabs/setup_input.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/gui/widgets/tabs') 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(Input::KEY_NO_VALUE)) + == static_cast(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(Input::KEY_NO_VALUE)); + inputManager.setNewKeyIndex(static_cast(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(Input::KEY_NO_VALUE)) + if (key.actionId == static_cast(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(Input::KEY_NO_VALUE)); + inputManager.setNewKeyIndex(static_cast(InputAction::NO_VALUE)); } } @@ -355,17 +355,17 @@ void Setup_Input::fixTranslation(SetupActionData *const actionDatas, void Setup_Input::fixTranslations() { - fixTranslation(setupActionData1, static_cast(Input::KEY_SHORTCUT_1), - static_cast(Input::KEY_SHORTCUT_20), "Item Shortcut %d"); + fixTranslation(setupActionData1, static_cast(InputAction::SHORTCUT_1), + static_cast(InputAction::SHORTCUT_20), "Item Shortcut %d"); - fixTranslation(setupActionData3, static_cast(Input::KEY_EMOTE_1), - static_cast(Input::KEY_EMOTE_48), "Emote Shortcut %d"); + fixTranslation(setupActionData3, static_cast(InputAction::EMOTE_1), + static_cast(InputAction::EMOTE_48), "Emote Shortcut %d"); - fixTranslation(setupActionData4, static_cast(Input::KEY_OUTFIT_1), - static_cast(Input::KEY_OUTFIT_48), "Outfit Shortcut %d"); + fixTranslation(setupActionData4, static_cast(InputAction::OUTFIT_1), + static_cast(InputAction::OUTFIT_48), "Outfit Shortcut %d"); fixTranslation(setupActionData7, static_cast( - Input::KEY_MOVE_TO_POINT_1), - static_cast(Input::KEY_MOVE_TO_POINT_48), + InputAction::MOVE_TO_POINT_1), + static_cast(InputAction::MOVE_TO_POINT_48), "Move to point Shortcut %d"); } -- cgit v1.2.3-70-g09d2