summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-24 22:49:20 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-24 22:49:20 +0300
commit84d56b88a03054d35b84dc1ecbd7ad4614f8ac86 (patch)
treea6de73a2a93ac287413917c1ba540dff6f65da5d /src/gui
parent0a4da74459471686e153b600253f12706d0ce8de (diff)
downloadplus-84d56b88a03054d35b84dc1ecbd7ad4614f8ac86.tar.gz
plus-84d56b88a03054d35b84dc1ecbd7ad4614f8ac86.tar.bz2
plus-84d56b88a03054d35b84dc1ecbd7ad4614f8ac86.tar.xz
plus-84d56b88a03054d35b84dc1ecbd7ad4614f8ac86.zip
Add new action for select closest monster without filters and sorting.
By default unassigned.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/setupactiondata.h6
-rw-r--r--src/gui/viewport.cpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/setupactiondata.h b/src/gui/setupactiondata.h
index 25d315b49..41fa6e3d9 100644
--- a/src/gui/setupactiondata.h
+++ b/src/gui/setupactiondata.h
@@ -127,6 +127,12 @@ static SetupActionData setupActionData0[] =
},
{
// TRANSLATORS: input action name
+ N_("Target closest monster (without filters)"),
+ InputAction::TARGET_CLOSEST_MONSTER,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
N_("Target NPC"),
InputAction::TARGET_NPC,
"",
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index af199c42e..225b88f30 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -543,7 +543,7 @@ void Viewport::mousePressed(MouseEvent &event)
if (actorManager)
{
Being *const target = actorManager->findNearestLivingBeing(
- pixelX, pixelY, 20, ActorType::MONSTER);
+ pixelX, pixelY, 20, ActorType::MONSTER, nullptr);
if (target)
player_node->setTarget(target);