From 84d56b88a03054d35b84dc1ecbd7ad4614f8ac86 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 24 Jun 2014 22:49:20 +0300 Subject: Add new action for select closest monster without filters and sorting. By default unassigned. --- src/gui/setupactiondata.h | 6 ++++++ src/gui/viewport.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src/gui') 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 @@ -125,6 +125,12 @@ static SetupActionData setupActionData0[] = InputAction::TARGET_MONSTER, "", }, + { + // TRANSLATORS: input action name + N_("Target closest monster (without filters)"), + InputAction::TARGET_CLOSEST_MONSTER, + "", + }, { // TRANSLATORS: input action name N_("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); -- cgit v1.2.3-70-g09d2