summaryrefslogtreecommitdiffstats
path: root/src/UI/SlotArea.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-04-15 21:10:44 +0200
committerdaniel0916 <theschokolps@gmail.com>2014-04-15 21:12:59 +0200
commite81fc2779e4b9a8ce847d63864537259033c9cb9 (patch)
tree379a0c0cf997d0417b64c26e0049a7c0945cbc6e /src/UI/SlotArea.h
parentModified names (diff)
downloadcuberite-e81fc2779e4b9a8ce847d63864537259033c9cb9.tar
cuberite-e81fc2779e4b9a8ce847d63864537259033c9cb9.tar.gz
cuberite-e81fc2779e4b9a8ce847d63864537259033c9cb9.tar.bz2
cuberite-e81fc2779e4b9a8ce847d63864537259033c9cb9.tar.lz
cuberite-e81fc2779e4b9a8ce847d63864537259033c9cb9.tar.xz
cuberite-e81fc2779e4b9a8ce847d63864537259033c9cb9.tar.zst
cuberite-e81fc2779e4b9a8ce847d63864537259033c9cb9.zip
Diffstat (limited to 'src/UI/SlotArea.h')
-rw-r--r--src/UI/SlotArea.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h
index 431ad753c..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;
@@ -67,8 +69,6 @@ public:
/// 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);
- virtual int GetItemPlaceCount(cItem & a_Item);
-
protected:
int m_NumSlots;
cWindow & m_ParentWindow;
@@ -260,19 +260,22 @@ class cSlotAreaEnchanting :
typedef cSlotAreaTemporary super;
public:
- cSlotAreaEnchanting(int a_NumSlots, cWindow & a_ParentWindow);
+ cSlotAreaEnchanting(cEnchantingWindow & a_ParentWindow);
- // cSlotAreaTemporary overrides:
+ // 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;
- virtual int GetItemPlaceCount(cItem & a_Item) override;
-protected:
- /// Handles a click in the item slot.
- void ClickedSlot(cPlayer & a_Player);
+ /* Get the count of bookshelves who stand in the near of the enchanting table */
+ int GetBookshelvesCount(cWorld * a_World);
- /// Handles a shift-click in the item slot.
- void ShiftClickedSlot(cPlayer & a_Player);
+protected:
+ /** Handles a click in the item slot. */
+ void UpdateResult(cPlayer & a_Player);
};