summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-11-11 21:33:14 +0100
committermadmaxoft <github@xoft.cz>2013-11-11 21:33:14 +0100
commit8fa8107e457388314c23f6dee210dfa2664de3e9 (patch)
treec9ceb1f2c69fad33169ddf7637d606b063d17945
parentAPIDump: Documented Vector3d. (diff)
downloadcuberite-8fa8107e457388314c23f6dee210dfa2664de3e9.tar
cuberite-8fa8107e457388314c23f6dee210dfa2664de3e9.tar.gz
cuberite-8fa8107e457388314c23f6dee210dfa2664de3e9.tar.bz2
cuberite-8fa8107e457388314c23f6dee210dfa2664de3e9.tar.lz
cuberite-8fa8107e457388314c23f6dee210dfa2664de3e9.tar.xz
cuberite-8fa8107e457388314c23f6dee210dfa2664de3e9.tar.zst
cuberite-8fa8107e457388314c23f6dee210dfa2664de3e9.zip
-rw-r--r--source/UI/SlotArea.cpp14
-rw-r--r--source/UI/SlotArea.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/source/UI/SlotArea.cpp b/source/UI/SlotArea.cpp
index ae493762a..7fd7cd996 100644
--- a/source/UI/SlotArea.cpp
+++ b/source/UI/SlotArea.cpp
@@ -404,6 +404,20 @@ void cSlotAreaCrafting::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction
+void cSlotAreaCrafting::DblClicked(cPlayer & a_Player, int a_SlotNum)
+{
+ if (a_SlotNum == 0)
+ {
+ // Dbl-clicking the crafting result slot shouldn't collect items to hand
+ return;
+ }
+ super::DblClicked(a_Player, a_SlotNum);
+}
+
+
+
+
+
void cSlotAreaCrafting::OnPlayerRemoved(cPlayer & a_Player)
{
// Toss all items on the crafting grid:
diff --git a/source/UI/SlotArea.h b/source/UI/SlotArea.h
index 4964e9986..b1944d901 100644
--- a/source/UI/SlotArea.h
+++ b/source/UI/SlotArea.h
@@ -221,6 +221,7 @@ public:
// cSlotAreaTemporary overrides:
virtual void Clicked (cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) override;
+ virtual void DblClicked (cPlayer & a_Player, int a_SlotNum);
virtual void OnPlayerRemoved(cPlayer & a_Player) override;
// Distributing items into this area is completely disabled