summaryrefslogtreecommitdiffstats
path: root/src/UI/SlotArea.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-04-24 19:57:25 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-04-24 19:57:25 +0200
commit48904ae201a38c4b6e018567976c00c40c2829c9 (patch)
treedfba8600b7f48e09c3c1d752b1cce1b4a45c8ea8 /src/UI/SlotArea.h
parentSome change to Entity.cpp (diff)
parentThe new leaves don't decay anymore. (diff)
downloadcuberite-48904ae201a38c4b6e018567976c00c40c2829c9.tar
cuberite-48904ae201a38c4b6e018567976c00c40c2829c9.tar.gz
cuberite-48904ae201a38c4b6e018567976c00c40c2829c9.tar.bz2
cuberite-48904ae201a38c4b6e018567976c00c40c2829c9.tar.lz
cuberite-48904ae201a38c4b6e018567976c00c40c2829c9.tar.xz
cuberite-48904ae201a38c4b6e018567976c00c40c2829c9.tar.zst
cuberite-48904ae201a38c4b6e018567976c00c40c2829c9.zip
Diffstat (limited to 'src/UI/SlotArea.h')
-rw-r--r--src/UI/SlotArea.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h
index 25b367cff..bab1098bb 100644
--- a/src/UI/SlotArea.h
+++ b/src/UI/SlotArea.h
@@ -19,6 +19,8 @@ class cDropSpenserEntity;
class cEnderChestEntity;
class cFurnaceEntity;
class cCraftingRecipe;
+class cEnchantingWindow;
+class cWorld;
@@ -66,7 +68,7 @@ public:
/// If a_CollectFullStacks is false, slots with full stacks are skipped while collecting.
/// Returns true if full stack has been collected in a_Dragging, false if there's space remaining to fill.
virtual bool CollectItemsToHand(cItem & a_Dragging, cPlayer & a_Player, bool a_CollectFullStacks);
-
+
protected:
int m_NumSlots;
cWindow & m_ParentWindow;
@@ -252,6 +254,34 @@ protected:
+class cSlotAreaEnchanting :
+ public cSlotAreaTemporary
+{
+ typedef cSlotAreaTemporary super;
+
+public:
+ cSlotAreaEnchanting(cEnchantingWindow & a_ParentWindow);
+
+ // cSlotArea 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) override;
+ virtual void DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ShouldApply, bool a_KeepEmptySlots) override;
+
+ // cSlotAreaTemporary overrides:
+ virtual void OnPlayerRemoved(cPlayer & a_Player) override;
+
+ /* Get the count of bookshelves who stand in the near of the enchanting table */
+ int GetBookshelvesCount(cWorld * a_World);
+
+protected:
+ /** Handles a click in the item slot. */
+ void UpdateResult(cPlayer & a_Player);
+};
+
+
+
+
+
class cSlotAreaChest :
public cSlotArea
{