summaryrefslogtreecommitdiff
path: root/src/actions/commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r--src/actions/commands.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 6f2bba4a7..dc4d70765 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -1621,4 +1621,56 @@ impHandler(selectSkillType)
return false;
}
+impHandler(showSkillOffsetX)
+{
+ 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->showSkillOffsetPopup(skill, true);
+ return true;
+}
+
+impHandler(showSkillOffsetY)
+{
+ 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->showSkillOffsetPopup(skill, false);
+ return true;
+}
+
+impHandler(setSkillOffsetX)
+{
+ int skill = 0;
+ int offset = 0;
+
+ if (skillDialog && parse2Int(event.args, skill, offset))
+ {
+ skillDialog->setSkillOffsetX(skill, offset);
+ return true;
+ }
+ return false;
+}
+
+impHandler(setSkillOffsetY)
+{
+ int skill = 0;
+ int offset = 0;
+
+ if (skillDialog && parse2Int(event.args, skill, offset))
+ {
+ skillDialog->setSkillOffsetY(skill, offset);
+ return true;
+ }
+ return false;
+}
+
} // namespace Actions