summaryrefslogtreecommitdiffstats
path: root/src/UI/SlotArea.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-07-09 14:30:06 +0200
committerHowaner <franzi.moos@googlemail.com>2014-07-09 14:30:06 +0200
commit3615bf825b53d3e192ad7fe6d047bd713bc00394 (patch)
treea6abe23cb87841069e88ca7533abdf1683fe8a7f /src/UI/SlotArea.h
parentAdded drop window action. (diff)
downloadcuberite-3615bf825b53d3e192ad7fe6d047bd713bc00394.tar
cuberite-3615bf825b53d3e192ad7fe6d047bd713bc00394.tar.gz
cuberite-3615bf825b53d3e192ad7fe6d047bd713bc00394.tar.bz2
cuberite-3615bf825b53d3e192ad7fe6d047bd713bc00394.tar.lz
cuberite-3615bf825b53d3e192ad7fe6d047bd713bc00394.tar.xz
cuberite-3615bf825b53d3e192ad7fe6d047bd713bc00394.tar.zst
cuberite-3615bf825b53d3e192ad7fe6d047bd713bc00394.zip
Diffstat (limited to 'src/UI/SlotArea.h')
-rw-r--r--src/UI/SlotArea.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h
index 03f538956..c40d65e0e 100644
--- a/src/UI/SlotArea.h
+++ b/src/UI/SlotArea.h
@@ -56,6 +56,9 @@ public:
/** Called from Clicked when the action is a drop click. */
virtual void DropClicked(cPlayer & a_Player, int a_SlotNum, bool a_DropStack);
+ /** Called from Clicked when the action is a number click. */
+ virtual void NumberClicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction);
+
/// Called when a new player opens the same parent window. The window already tracks the player. CS-locked.
virtual void OnPlayerAdded(cPlayer & a_Player);
@@ -242,6 +245,7 @@ public:
// Distributing items into this area is completely disabled
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
typedef std::list<std::pair<int, cCraftingRecipe> > cRecipeMap;
@@ -257,7 +261,7 @@ protected:
/** Handles a drop-click in the result slot. */
void DropClickedResult(cPlayer & a_Player);
-
+
/// Updates the current recipe and result slot based on the ingredients currently in the crafting grid of the specified player
void UpdateRecipe(cPlayer & a_Player);