summaryrefslogtreecommitdiffstats
path: root/src/UI/SlotArea.h
diff options
context:
space:
mode:
authordaniel0916 <theschokolps@gmail.com>2014-01-20 18:22:08 +0100
committerdaniel0916 <theschokolps@gmail.com>2014-01-20 18:22:08 +0100
commit0c2b307eab67b7f37d82a7862a6acbcd96b45adb (patch)
tree42c46a87004237c02151454c978abaf6c36b9075 /src/UI/SlotArea.h
parentAPIDump: Added notes about objects across cWorld's task execution. (diff)
downloadcuberite-0c2b307eab67b7f37d82a7862a6acbcd96b45adb.tar
cuberite-0c2b307eab67b7f37d82a7862a6acbcd96b45adb.tar.gz
cuberite-0c2b307eab67b7f37d82a7862a6acbcd96b45adb.tar.bz2
cuberite-0c2b307eab67b7f37d82a7862a6acbcd96b45adb.tar.lz
cuberite-0c2b307eab67b7f37d82a7862a6acbcd96b45adb.tar.xz
cuberite-0c2b307eab67b7f37d82a7862a6acbcd96b45adb.tar.zst
cuberite-0c2b307eab67b7f37d82a7862a6acbcd96b45adb.zip
Diffstat (limited to 'src/UI/SlotArea.h')
-rw-r--r--src/UI/SlotArea.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h
index d31c87e0c..bd5c66c77 100644
--- a/src/UI/SlotArea.h
+++ b/src/UI/SlotArea.h
@@ -252,6 +252,34 @@ protected:
+class cSlotAreaEnchanting :
+ public cSlotAreaTemporary
+{
+ typedef cSlotAreaTemporary super;
+
+public:
+ /// a_GridSize is allowed to be only 2 or 3
+ cSlotAreaEnchanting(int a_NumSlots, cWindow & a_ParentWindow);
+
+ // cSlotAreaTemporary overrides:
+ virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) override;
+ virtual void OnPlayerRemoved(cPlayer & a_Player) override;
+
+ // Distributing items into this area is completely disabled
+ virtual void DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ShouldApply, bool a_KeepEmptySlots) override {}
+
+protected:
+ /// Handles a click in the result slot. Crafts using the current recipe, if possible
+ void ClickedResult(cPlayer & a_Player);
+
+ /// Handles a shift-click in the result slot. Crafts using the current recipe until it changes or no more space for result.
+ void ShiftClickedResult(cPlayer & a_Player);
+};
+
+
+
+
+
class cSlotAreaChest :
public cSlotArea
{