summaryrefslogtreecommitdiff
path: root/src/input/inputmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-18 17:57:37 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-18 17:57:37 +0300
commit515ce6c1413b5e3da131f3e4997abdc39c003a2c (patch)
treee09ec08d83cacb2012522e679323c140d95707c9 /src/input/inputmanager.cpp
parentbe320cc5c9ca819b42a7ad8ef9806051d9eef75a (diff)
downloadmv-515ce6c1413b5e3da131f3e4997abdc39c003a2c.tar.gz
mv-515ce6c1413b5e3da131f3e4997abdc39c003a2c.tar.bz2
mv-515ce6c1413b5e3da131f3e4997abdc39c003a2c.tar.xz
mv-515ce6c1413b5e3da131f3e4997abdc39c003a2c.zip
Move inputconditions into separate file.
Diffstat (limited to 'src/input/inputmanager.cpp')
-rw-r--r--src/input/inputmanager.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index 0c99c0908..27d41e1fd 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -617,53 +617,53 @@ void InputManager::updateConditionMask()
{
mMask = 1;
if (keyboard.isEnabled())
- mMask |= COND_ENABLED;
+ mMask |= InputCondition::ENABLED;
if ((!chatWindow || !chatWindow->isInputFocused()) &&
!NpcDialog::isAnyInputFocused() &&
!InventoryWindow::isAnyInputFocused() &&
(!tradeWindow || !tradeWindow->isInpupFocused()))
{
- mMask |= COND_NOINPUT;
+ mMask |= InputCondition::NOINPUT;
}
if (!BuyDialog::isActive() && !SellDialog::isActive())
- mMask |= COND_NOBUYSELL;
+ mMask |= InputCondition::NOBUYSELL;
if (!player_node || !player_node->getAway())
- mMask |= COND_NOAWAY;
+ mMask |= InputCondition::NOAWAY;
if (!setupWindow || !setupWindow->isWindowVisible())
- mMask |= COND_NOSETUP;
+ mMask |= InputCondition::NOSETUP;
if (Game::instance() && Game::instance()->getValidSpeed())
- mMask |= COND_VALIDSPEED;
+ mMask |= InputCondition::VALIDSPEED;
if (gui && !gui->getFocusHandler()->getModalFocused())
- mMask |= COND_NOMODAL;
+ mMask |= InputCondition::NOMODAL;
const NpcDialog *const dialog = NpcDialog::getActive();
if (!dialog || !dialog->isTextInputFocused())
- mMask |= COND_NONPCINPUT;
+ mMask |= InputCondition::NONPCINPUT;
if (!dialog || dialog->isCloseState())
{
- mMask |= COND_NONPCDIALOG;
+ mMask |= InputCondition::NONPCDIALOG;
if (!InventoryWindow::isStorageActive())
- mMask |= COND_NOTALKING;
+ mMask |= InputCondition::NOTALKING;
}
if (!player_node || !player_node->getDisableGameModifiers())
- mMask |= COND_EMODS;
+ mMask |= InputCondition::EMODS;
if (!isActionActive0(Input::KEY_STOP_ATTACK)
&& !isActionActive0(Input::KEY_UNTARGET))
{
- mMask |= COND_NOTARGET;
+ mMask |= InputCondition::NOTARGET;
}
if (Game::instance())
- mMask |= COND_INGAME;
+ mMask |= InputCondition::INGAME;
if (!player_node || player_node->getFollow().empty())
- mMask |= COND_NOFOLLOW;
+ mMask |= InputCondition::NOFOLLOW;
}
bool InputManager::checkKey(const KeyData *const key) const