summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-15 19:55:42 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-15 19:55:42 +0300
commit75d94c3c01eaa828d8e96767b06e3d0c3019ffa3 (patch)
treebe72fab95329eff4da04f2dbe2e56dec2781e47b /src/actions
parenta520caf57d759e725d8e63d1c47d9b3d5e779324 (diff)
downloadplus-75d94c3c01eaa828d8e96767b06e3d0c3019ffa3.tar.gz
plus-75d94c3c01eaa828d8e96767b06e3d0c3019ffa3.tar.bz2
plus-75d94c3c01eaa828d8e96767b06e3d0c3019ffa3.tar.xz
plus-75d94c3c01eaa828d8e96767b06e3d0c3019ffa3.zip
Change cast offset in skills dialog.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/commands.cpp52
-rw-r--r--src/actions/commands.h4
2 files changed, 56 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
diff --git a/src/actions/commands.h b/src/actions/commands.h
index ce07d3b03..ff17da2d3 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -144,6 +144,10 @@ namespace Actions
decHandler(showSkillLevels);
decHandler(showSkillType);
decHandler(selectSkillType);
+ decHandler(showSkillOffsetX);
+ decHandler(showSkillOffsetY);
+ decHandler(setSkillOffsetX);
+ decHandler(setSkillOffsetY);
} // namespace Actions
#undef decHandler