summaryrefslogtreecommitdiff
path: root/src/actions/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-05 23:34:33 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-06 00:07:18 +0300
commitbcdbc39b6efe7391866c81ef82a2e9358b6c3ff4 (patch)
treec296c08021c602687e3632b1f4c3f87033c99d34 /src/actions/commands.cpp
parent8b392d9c4a1c177c1207d297c75c1a4a06142245 (diff)
downloadmanaplus-bcdbc39b6efe7391866c81ef82a2e9358b6c3ff4.tar.gz
manaplus-bcdbc39b6efe7391866c81ef82a2e9358b6c3ff4.tar.bz2
manaplus-bcdbc39b6efe7391866c81ef82a2e9358b6c3ff4.tar.xz
manaplus-bcdbc39b6efe7391866c81ef82a2e9358b6c3ff4.zip
Add menu for selected skill for now with item only "set skill level".s20160706
Also add chat command /showskilllevels SKILL
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r--src/actions/commands.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index b25600835..98db8d57f 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -37,6 +37,8 @@
#include "gui/viewport.h"
+#include "gui/popups/popupmenu.h"
+
#ifdef EATHENA_SUPPORT
#include "gui/shortcut/emoteshortcut.h"
@@ -1174,7 +1176,6 @@ impHandler(skill)
}
else
{
- logger->log("text: " + text);
skillDialog->useSkill(skillId,
AutoTarget_true,
level,
@@ -1621,4 +1622,17 @@ impHandlerE(adoptChild)
#endif
}
+impHandler(showSkillLevels)
+{
+ const std::string args = event.args;
+ if (args.empty())
+ return false;
+ const SkillInfo *restrict const skill = skillDialog->getSkill(
+ atoi(args.c_str()));
+ if (!skill)
+ return false;
+ popupMenu->showSkillLevelPopup(skill);
+ return true;
+}
+
} // namespace Actions