diff options
author | daniel0916 <theschokolps@gmail.com> | 2014-04-14 13:39:44 +0200 |
---|---|---|
committer | daniel0916 <theschokolps@gmail.com> | 2014-04-14 13:39:44 +0200 |
commit | a51a099c81f34f875c76d560e6729889b2fdd4fa (patch) | |
tree | 5125f8ad0e81c96e0183798f2bf0ebcebe699249 | |
parent | Fixed Bookshelf Checking (diff) | |
download | cuberite-a51a099c81f34f875c76d560e6729889b2fdd4fa.tar cuberite-a51a099c81f34f875c76d560e6729889b2fdd4fa.tar.gz cuberite-a51a099c81f34f875c76d560e6729889b2fdd4fa.tar.bz2 cuberite-a51a099c81f34f875c76d560e6729889b2fdd4fa.tar.lz cuberite-a51a099c81f34f875c76d560e6729889b2fdd4fa.tar.xz cuberite-a51a099c81f34f875c76d560e6729889b2fdd4fa.tar.zst cuberite-a51a099c81f34f875c76d560e6729889b2fdd4fa.zip |
Diffstat (limited to '')
-rw-r--r-- | src/UI/SlotArea.cpp | 14 | ||||
-rw-r--r-- | src/UI/SlotArea.h | 4 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 23108c256..eb528d7ca 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -628,11 +628,11 @@ void cSlotAreaEnchanting::Clicked(cPlayer & a_Player, int a_SlotNum, eClickActio { if ((a_ClickAction == caShiftLeftClick) || (a_ClickAction == caShiftRightClick)) { - ShiftClickedResult(a_Player); + ShiftClickedSlot(a_Player); } else { - ClickedResult(a_Player); + ClickedSlot(a_Player); } } } @@ -641,7 +641,7 @@ void cSlotAreaEnchanting::Clicked(cPlayer & a_Player, int a_SlotNum, eClickActio -void cSlotAreaEnchanting::ClickedResult(cPlayer & a_Player) +void cSlotAreaEnchanting::ClickedSlot(cPlayer & a_Player) { cItem Item = *GetSlot(0, a_Player); @@ -651,7 +651,7 @@ void cSlotAreaEnchanting::ClickedResult(cPlayer & a_Player) m_ParentWindow.SetProperty(1, 0, a_Player); m_ParentWindow.SetProperty(2, 0, a_Player); } - else if (cItem::IsEnchantable(Item.m_ItemType)) + else if (cItem::IsEnchantable(Item.m_ItemType) && Item.m_Enchantments.IsEmpty()) { int PosX = 0; int PosY = 0; @@ -707,9 +707,11 @@ void cSlotAreaEnchanting::ClickedResult(cPlayer & a_Player) -void cSlotAreaEnchanting::ShiftClickedResult(cPlayer & a_Player) +void cSlotAreaEnchanting::ShiftClickedSlot(cPlayer & a_Player) { - LOGWARN("Shift Click!"); + m_ParentWindow.SetProperty(0, 0, a_Player); + m_ParentWindow.SetProperty(1, 0, a_Player); + m_ParentWindow.SetProperty(2, 0, a_Player); } diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h index 7feb74aa1..a6af72273 100644 --- a/src/UI/SlotArea.h +++ b/src/UI/SlotArea.h @@ -266,10 +266,10 @@ public: protected: /// Handles a click in the item slot. - void ClickedResult(cPlayer & a_Player); + void ClickedSlot(cPlayer & a_Player); /// Handles a shift-click in the item slot. - void ShiftClickedResult(cPlayer & a_Player); + void ShiftClickedSlot(cPlayer & a_Player); }; |