summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-08 16:48:15 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-08 16:48:15 +0300
commit25a6eae7f4fb561bbf930be28ee09510b40ebc80 (patch)
treeb6ba46e819293992216c6740c482b491c6f8d0eb /src/gui/viewport.cpp
parentad0fcc99678c13c6f6ebacead6ba2d573294163d (diff)
downloadplus-25a6eae7f4fb561bbf930be28ee09510b40ebc80.tar.gz
plus-25a6eae7f4fb561bbf930be28ee09510b40ebc80.tar.bz2
plus-25a6eae7f4fb561bbf930be28ee09510b40ebc80.tar.xz
plus-25a6eae7f4fb561bbf930be28ee09510b40ebc80.zip
Move enums from keyboardconfig.h to keydata.h.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 7fa0dc464..6c6580f21 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -504,17 +504,17 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
}
}
else if (player_node->withinAttackRange(mHoverBeing) ||
- keyboard.isActionActive(keyboard.KEY_ATTACK))
+ keyboard.isActionActive(Input::KEY_ATTACK))
{
validateSpeed();
if (player_node != mHoverBeing)
{
player_node->attack(mHoverBeing,
- !keyboard.isActionActive(keyboard.KEY_TARGET));
+ !keyboard.isActionActive(Input::KEY_TARGET));
return;
}
}
- else if (!keyboard.isActionActive(keyboard.KEY_ATTACK))
+ else if (!keyboard.isActionActive(Input::KEY_ATTACK))
{
validateSpeed();
if (player_node != mHoverBeing)
@@ -532,7 +532,7 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
player_node->pickUp(mHoverItem);
}
// Just walk around
- else if (!keyboard.isActionActive(keyboard.KEY_ATTACK))
+ else if (!keyboard.isActionActive(Input::KEY_ATTACK))
{
validateSpeed();
player_node->stopAttack();
@@ -933,8 +933,8 @@ void Viewport::returnCamera()
void Viewport::validateSpeed()
{
- if (!keyboard.isActionActive(keyboard.KEY_TARGET_ATTACK)
- && !keyboard.isActionActive(keyboard.KEY_ATTACK))
+ if (!keyboard.isActionActive(Input::KEY_TARGET_ATTACK)
+ && !keyboard.isActionActive(Input::KEY_ATTACK))
{
if (Game::instance())
Game::instance()->setValidSpeed();