diff options
Diffstat (limited to 'src/gui/widgets/itemcontainer.h')
-rw-r--r-- | src/gui/widgets/itemcontainer.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h index 42aeb2684..4e29cf2c5 100644 --- a/src/gui/widgets/itemcontainer.h +++ b/src/gui/widgets/itemcontainer.h @@ -60,6 +60,7 @@ class ItemContainer final : public Widget, */ ItemContainer(const Widget2 *const widget, Inventory *const inventory, + const int maxColumns = 100000, const ShowEmptyRows showEmptyRows = ShowEmptyRows_false, const ForceQuantity forceQuantity = ForceQuantity_false); @@ -96,6 +97,8 @@ class ItemContainer final : public Widget, // WidgetListener void widgetResized(const Event &event) override final; + void widgetMoved(const Event &event) override final; + /** * Returns the selected item. */ @@ -171,7 +174,7 @@ class ItemContainer final : public Widget, void distributeValueChangedEvent(); /** - * Gets the slot index based on the cursor position. + * Gets the inventory slot index based on the cursor position. * * @param x The X coordinate position. * @param y The Y coordinate position. @@ -179,6 +182,8 @@ class ItemContainer final : public Widget, */ int getSlotIndex(int x, int y) const; + int getSlotByXY(int x, int y) const; + Inventory *mInventory; Image *mSelImg; Image *mProtectedImg; @@ -207,6 +212,7 @@ class ItemContainer final : public Widget, int mEquippedTextPadding; int mPaddingItemX; int mPaddingItemY; + int mMaxColumns; SelectionState mSelectionStatus; ForceQuantity mForceQuantity; ShowEmptyRows mShowEmptyRows; |