summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/target.cpp14
-rw-r--r--src/actions/target.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/actions/target.cpp b/src/actions/target.cpp
index 8212a3a97..e59c2922d 100644
--- a/src/actions/target.cpp
+++ b/src/actions/target.cpp
@@ -26,6 +26,8 @@
#include "being/localplayer.h"
+#include "gui/popups/popupmenu.h"
+
#include "debug.h"
namespace Actions
@@ -76,4 +78,16 @@ impHandler0(targetPet)
return setTarget(ActorType::Pet, true);
}
+impHandler0(contextMenu)
+{
+ if (!localPlayer)
+ return false;
+ Being *const target = localPlayer->getTarget();
+ if (!target)
+ return true;
+
+ popupMenu->showPopup(target->getPixelX(), target->getPixelY(), target);
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/target.h b/src/actions/target.h
index 50ac1e63e..1506660a6 100644
--- a/src/actions/target.h
+++ b/src/actions/target.h
@@ -33,6 +33,7 @@ namespace Actions
decHandler(targetNPC);
decHandler(targetMercenary);
decHandler(targetPet);
+ decHandler(contextMenu);
} // namespace Actions
#undef decHandler