diff options
Diffstat (limited to 'src/UI')
-rw-r--r-- | src/UI/SlotArea.h | 96 | ||||
-rw-r--r-- | src/UI/Window.h | 10 | ||||
-rw-r--r-- | src/UI/WindowOwner.h | 4 |
3 files changed, 55 insertions, 55 deletions
diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h index 6bbc87b76..cf0a129df 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 overrides: - virtual void OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) override; + // cItemGrid::cListener /*override*/s: + 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 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; + // 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*/; /// 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 overrides: - virtual void Clicked (cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) override; + // cSlotAreaTemporary /*override*/s: + 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 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; + // 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*/; - // cSlotAreaTemporary overrides: - virtual void OnPlayerRemoved(cPlayer & a_Player) override; + // cSlotAreaTemporary /*override*/s: + 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 overrides: - virtual void OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) override; + // cItemGrid::cListener /*override*/s: + 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 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; + // 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*/; virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) override; - // cSlotAreaTemporary overrides: + // cSlotAreaTemporary /*override*/s: 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 overrides: - virtual void OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) override; + // cItemGrid::cListener /*override*/s: + 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); diff --git a/src/UI/Window.h b/src/UI/Window.h index 3d860407f..4546fb9ad 100644 --- a/src/UI/Window.h +++ b/src/UI/Window.h @@ -269,7 +269,7 @@ public: cBeaconEntity * GetBeaconEntity(void) const { return m_Beacon; } // cWindow Overrides: - virtual void OpenedByPlayer(cPlayer & a_Player) override; + virtual void OpenedByPlayer(cPlayer & a_Player) /*override*/; protected: cBeaconEntity * m_Beacon; @@ -285,8 +285,8 @@ class cEnchantingWindow : typedef cWindow super; public: cEnchantingWindow(int a_BlockX, int a_BlockY, int a_BlockZ); - virtual void SetProperty(int a_Property, int a_Value, cPlayer & a_Player) override; - virtual void SetProperty(int a_Property, int a_Value) override; + virtual void SetProperty(int a_Property, int a_Value, cPlayer & a_Player) /*override*/; + virtual void SetProperty(int a_Property, int a_Value) /*override*/; /** Return the Value of a Property */ int GetPropertyValue(int a_Property); @@ -346,8 +346,8 @@ public: cChestWindow(cChestEntity * a_PrimaryChest, cChestEntity * a_SecondaryChest); ~cChestWindow(); - virtual bool ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse) override; - virtual void OpenedByPlayer(cPlayer & a_Player) override; + virtual bool ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse) /*override*/; + virtual void OpenedByPlayer(cPlayer & a_Player) /*override*/; protected: cWorld * m_World; diff --git a/src/UI/WindowOwner.h b/src/UI/WindowOwner.h index 7a7941e37..5b41e9908 100644 --- a/src/UI/WindowOwner.h +++ b/src/UI/WindowOwner.h @@ -81,7 +81,7 @@ public: m_BlockEntity = a_BlockEntity; } - virtual void GetBlockPos(int & a_BlockX, int & a_BlockY, int & a_BlockZ) override + virtual void GetBlockPos(int & a_BlockX, int & a_BlockY, int & a_BlockZ) /*override*/ { a_BlockX = m_BlockEntity->GetPosX(); a_BlockY = m_BlockEntity->GetPosY(); @@ -113,7 +113,7 @@ public: m_Entity = a_Entity; } - virtual void GetBlockPos(int & a_BlockX, int & a_BlockY, int & a_BlockZ) override + virtual void GetBlockPos(int & a_BlockX, int & a_BlockY, int & a_BlockZ) /*override*/ { a_BlockX = (int)floor(m_Entity->GetPosX() + 0.5); a_BlockY = (int)floor(m_Entity->GetPosY() + 0.5); |