diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-03-01 18:48:44 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-03-01 18:48:44 +0100 |
commit | 0d26e81ab56f7a945af23034878e0487aa65800f (patch) | |
tree | 2acb54403850d8225d9d445e97ede81fe12c5934 /src/UI | |
parent | Final implementation of MetaRotater (diff) | |
parent | Merge pull request #735 from xdot/master (diff) | |
download | cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.gz cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.bz2 cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.lz cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.xz cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.zst cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.zip |
Diffstat (limited to 'src/UI')
-rw-r--r-- | src/UI/SlotArea.cpp | 30 | ||||
-rw-r--r-- | src/UI/SlotArea.h | 6 |
2 files changed, 33 insertions, 3 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index bfcad3d92..88977e005 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -224,6 +224,24 @@ void cSlotArea::DblClicked(cPlayer & a_Player, int a_SlotNum) +void cSlotArea::OnPlayerAdded(cPlayer & a_Player) +{ + UNUSED(a_Player); +} + + + + + +void cSlotArea::OnPlayerRemoved(cPlayer & a_Player) +{ + UNUSED(a_Player); +} + + + + + void cSlotArea::DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_Apply, bool a_KeepEmptySlots) { for (int i = 0; i < m_NumSlots; i++) @@ -447,6 +465,18 @@ void cSlotAreaCrafting::OnPlayerRemoved(cPlayer & a_Player) + +void cSlotAreaCrafting::DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ShouldApply, bool a_KeepEmptySlots) +{ + UNUSED(a_ItemStack); + UNUSED(a_Player); + UNUSED(a_ShouldApply); + UNUSED(a_KeepEmptySlots); +} + + + + void cSlotAreaCrafting::ClickedResult(cPlayer & a_Player) { cItem & DraggingItem = a_Player.GetDraggingItem(); diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h index d31c87e0c..25b367cff 100644 --- a/src/UI/SlotArea.h +++ b/src/UI/SlotArea.h @@ -48,10 +48,10 @@ public: virtual void DblClicked(cPlayer & a_Player, int a_SlotNum); /// Called when a new player opens the same parent window. The window already tracks the player. CS-locked. - virtual void OnPlayerAdded(cPlayer & a_Player) {} ; + virtual void OnPlayerAdded(cPlayer & a_Player); /// Called when one of the players closes the parent window. The window already doesn't track the player. CS-locked. - virtual void OnPlayerRemoved(cPlayer & a_Player) {} ; + virtual void OnPlayerRemoved(cPlayer & a_Player); /** Called to store as much of a_ItemStack in the area as possible. a_ItemStack is modified to reflect the change. The default implementation searches each slot for available space and distributes the stack there. @@ -226,7 +226,7 @@ public: 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 {} + virtual void DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ShouldApply, bool a_KeepEmptySlots) override; protected: /// Maps player's EntityID -> current recipe; not a std::map because cCraftingGrid needs proper constructor params |