summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-26 21:40:24 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-27 02:22:56 +0300
commit3a19b08078d42837126cc585d2a9b6f5f61b2c2b (patch)
tree400122420df75e178cb7d52cfd2f67cd12d394a8 /src/actions
parent4a6e5d83cd39dfde59d273b9be79cd76c685a8e9 (diff)
downloadplus-3a19b08078d42837126cc585d2a9b6f5f61b2c2b.tar.gz
plus-3a19b08078d42837126cc585d2a9b6f5f61b2c2b.tar.bz2
plus-3a19b08078d42837126cc585d2a9b6f5f61b2c2b.tar.xz
plus-3a19b08078d42837126cc585d2a9b6f5f61b2c2b.zip
Add quick shortcuts for add selected item to each craft inventory slot.
Add craft tab with shortcuts in input tab.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/actions.cpp14
-rw-r--r--src/actions/actions.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index df4f23779..eb6404d37 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -1674,4 +1674,18 @@ impHandler0(testInfo)
return false;
}
+impHandler(craftKey)
+{
+#ifdef EATHENA_SUPPORT
+ const int slot = (event.action - InputAction::CRAFT_1);
+ if (slot >= 0 && slot < 9)
+ {
+ if (inventoryWindow)
+ inventoryWindow->moveItemToCraft(slot);
+ return true;
+ }
+#endif
+ return false;
+}
+
} // namespace Actions
diff --git a/src/actions/actions.h b/src/actions/actions.h
index cb382ddef..712017bd0 100644
--- a/src/actions/actions.h
+++ b/src/actions/actions.h
@@ -109,6 +109,7 @@ namespace Actions
decHandler(kick);
decHandler(clearDrop);
decHandler(testInfo);
+ decHandler(craftKey);
} // namespace Actions
#undef decHandler