Fixed dblclicking in crafting slot area.

Fixes #229.
master
madmaxoft 2013-11-11 21:33:14 +01:00
parent 9287349cc2
commit 8fa8107e45
2 changed files with 15 additions and 0 deletions

View File

@ -404,6 +404,20 @@ void cSlotAreaCrafting::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction
void cSlotAreaCrafting::DblClicked(cPlayer & a_Player, int a_SlotNum)
{
if (a_SlotNum == 0)
{
// Dbl-clicking the crafting result slot shouldn't collect items to hand
return;
}
super::DblClicked(a_Player, a_SlotNum);
}
void cSlotAreaCrafting::OnPlayerRemoved(cPlayer & a_Player) void cSlotAreaCrafting::OnPlayerRemoved(cPlayer & a_Player)
{ {
// Toss all items on the crafting grid: // Toss all items on the crafting grid:

View File

@ -221,6 +221,7 @@ public:
// cSlotAreaTemporary overrides: // cSlotAreaTemporary overrides:
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 void DblClicked (cPlayer & a_Player, int a_SlotNum);
virtual void OnPlayerRemoved(cPlayer & a_Player) override; virtual void OnPlayerRemoved(cPlayer & a_Player) override;
// Distributing items into this area is completely disabled // Distributing items into this area is completely disabled