diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-09-05 16:56:31 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-09-05 16:56:31 +0200 |
commit | 28f66efe307150558f4ad2546e058370a828be3e (patch) | |
tree | 2ef088aa2d1a8ae85007b34b463d5044847bf006 /src/UI/SlotArea.h | |
parent | Merge branch 'master' into ComponentRewrite (diff) | |
download | cuberite-28f66efe307150558f4ad2546e058370a828be3e.tar cuberite-28f66efe307150558f4ad2546e058370a828be3e.tar.gz cuberite-28f66efe307150558f4ad2546e058370a828be3e.tar.bz2 cuberite-28f66efe307150558f4ad2546e058370a828be3e.tar.lz cuberite-28f66efe307150558f4ad2546e058370a828be3e.tar.xz cuberite-28f66efe307150558f4ad2546e058370a828be3e.tar.zst cuberite-28f66efe307150558f4ad2546e058370a828be3e.zip |
Diffstat (limited to 'src/UI/SlotArea.h')
-rw-r--r-- | src/UI/SlotArea.h | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h index cf0a129df..6bbc87b76 100644 --- a/src/UI/SlotArea.h +++ b/src/UI/SlotArea.h @@ -99,10 +99,10 @@ public: cSlotAreaInventoryBase(int a_NumSlots, int a_SlotOffset, cWindow & a_ParentWindow); // Creative inventory's click handling is somewhat different from survival inventory's, handle that here: - virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) /*override*/; + virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) override; - virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const /*override*/; - virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) /*override*/; + virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const override; + virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) override; protected: int m_SlotOffset; // Index that this area's slot 0 has in the underlying cInventory @@ -157,10 +157,10 @@ public: } /** Distributing the stack is allowed only for compatible items (helmets into helmet slot etc.) */ - 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; /** Called when a player clicks in the window. Parameters taken from the click packet. */ - virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) /*override*/; + virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) override; static bool CanPlaceArmorInSlot(int a_SlotNum, const cItem & a_Item); } ; @@ -181,14 +181,14 @@ public: virtual ~cSlotAreaItemGrid(); - virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const /*override*/; - virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) /*override*/; + virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const override; + virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) override; protected: cItemGrid & m_ItemGrid; - // cItemGrid::cListener /*override*/s: - virtual void OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) /*override*/; + // cItemGrid::cListener overrides: + virtual void OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) override; } ; @@ -207,11 +207,11 @@ class cSlotAreaTemporary : public: cSlotAreaTemporary(int a_NumSlots, cWindow & a_ParentWindow); - // cSlotArea /*override*/s: - virtual const cItem * GetSlot (int a_SlotNum, cPlayer & a_Player) const /*override*/; - virtual void SetSlot (int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) /*override*/; - virtual void OnPlayerAdded (cPlayer & a_Player) /*override*/; - virtual void OnPlayerRemoved(cPlayer & a_Player) /*override*/; + // cSlotArea overrides: + virtual const cItem * GetSlot (int a_SlotNum, cPlayer & a_Player) const override; + virtual void SetSlot (int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) override; + virtual void OnPlayerAdded (cPlayer & a_Player) override; + virtual void OnPlayerRemoved(cPlayer & a_Player) override; /// Tosses the player's items in slots [a_Begin, a_End) (ie. incl. a_Begin, but excl. a_End) void TossItems(cPlayer & a_Player, int a_Begin, int a_End); @@ -238,14 +238,14 @@ public: /// a_GridSize is allowed to be only 2 or 3 cSlotAreaCrafting(int a_GridSize, cWindow & a_ParentWindow); - // cSlotAreaTemporary /*override*/s: - virtual void Clicked (cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) /*override*/; + // 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*/; - virtual void SetSlot (int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) /*override*/; + virtual void OnPlayerRemoved(cPlayer & a_Player) override; + virtual void SetSlot (int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) 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: @@ -286,13 +286,13 @@ class cSlotAreaAnvil : public: cSlotAreaAnvil(cAnvilWindow & a_ParentWindow); - // cSlotArea /*override*/s: - virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) /*override*/; - virtual void ShiftClicked(cPlayer & a_Player, int a_SlotNum, const cItem & a_ClickedItem) /*override*/; - virtual void DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ShouldApply, bool a_KeepEmptySlots) /*override*/; + // cSlotArea overrides: + virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) override; + virtual void ShiftClicked(cPlayer & a_Player, int a_SlotNum, const cItem & a_ClickedItem) override; + virtual void DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ShouldApply, bool a_KeepEmptySlots) override; - // cSlotAreaTemporary /*override*/s: - virtual void OnPlayerRemoved(cPlayer & a_Player) /*override*/; + // cSlotAreaTemporary overrides: + virtual void OnPlayerRemoved(cPlayer & a_Player) override; /** Can the player take the item from the slot? */ bool CanTakeResultItem(cPlayer & a_Player); @@ -327,16 +327,16 @@ public: bool IsPlaceableItem(short a_ItemType); - virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) /*override*/; - virtual void DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ShouldApply, bool a_KeepEmptySlots) /*override*/; - virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const /*override*/; - virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) /*override*/; + virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) override; + virtual void DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ShouldApply, bool a_KeepEmptySlots) override; + virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const override; + virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) override; protected: cBeaconEntity * m_Beacon; - // cItemGrid::cListener /*override*/s: - virtual void OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) /*override*/; + // cItemGrid::cListener overrides: + virtual void OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) override; } ; @@ -351,14 +351,14 @@ class cSlotAreaEnchanting : public: cSlotAreaEnchanting(cEnchantingWindow & a_ParentWindow, int a_BlockX, int a_BlockY, int a_BlockZ); - // cSlotArea /*override*/s: - virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) /*override*/; - virtual void DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ShouldApply, bool a_KeepEmptySlots) /*override*/; + // cSlotArea overrides: + virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) override; + virtual void DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ShouldApply, bool a_KeepEmptySlots) override; virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) override; - // cSlotAreaTemporary /*override*/s: + // cSlotAreaTemporary overrides: virtual void OnPlayerAdded (cPlayer & a_Player) override; - virtual void OnPlayerRemoved(cPlayer & a_Player) /*override*/; + 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); @@ -380,8 +380,8 @@ class cSlotAreaChest : public: cSlotAreaChest(cChestEntity * a_Chest, cWindow & a_ParentWindow); - virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const /*override*/; - virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) /*override*/; + virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const override; + virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) override; protected: cChestEntity * m_Chest; @@ -397,8 +397,8 @@ class cSlotAreaDoubleChest : public: cSlotAreaDoubleChest(cChestEntity * a_TopChest, cChestEntity * a_BottomChest, cWindow & a_ParentWindow); - virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const /*override*/; - virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) /*override*/; + virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const override; + virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) override; protected: cChestEntity * m_TopChest; @@ -415,8 +415,8 @@ class cSlotAreaEnderChest : public: cSlotAreaEnderChest(cEnderChestEntity * a_EnderChest, cWindow & a_ParentWindow); - virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const /*override*/; - virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) /*override*/; + virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const override; + virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) override; protected: cEnderChestEntity * m_EnderChest; @@ -437,16 +437,16 @@ public: virtual ~cSlotAreaFurnace(); - virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) /*override*/; - virtual void DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ShouldApply, bool a_KeepEmptySlots) /*override*/; - virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const /*override*/; - virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) /*override*/; + virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) override; + virtual void DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ShouldApply, bool a_KeepEmptySlots) override; + virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const override; + virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) override; protected: cFurnaceEntity * m_Furnace; - // cItemGrid::cListener /*override*/s: - virtual void OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) /*override*/; + // cItemGrid::cListener overrides: + virtual void OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) override; /// Called after an item has been smelted to handle statistics e.t.c. void HandleSmeltItem(const cItem & a_Result, cPlayer & a_Player); |