diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-27 16:00:13 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-27 16:00:13 +1100 |
commit | 888cde79ef8f6d1b008e86207b41e1fd686c7636 (patch) | |
tree | 576e23c94d227f76bec06cd0357809c703dc4c53 /source/windowing/StarItemSlotWidget.hpp | |
parent | c484fab32dcac655164f082805d1d55d1d058f2f (diff) |
feat: middle click objects in the inventory to open their interface
makes carrying around shop objects easier
might need to restrict the allowed interaction types more, as some may break due to the source entity being the player
Diffstat (limited to 'source/windowing/StarItemSlotWidget.hpp')
-rw-r--r-- | source/windowing/StarItemSlotWidget.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/windowing/StarItemSlotWidget.hpp b/source/windowing/StarItemSlotWidget.hpp index 9e8772d..aaa4c9c 100644 --- a/source/windowing/StarItemSlotWidget.hpp +++ b/source/windowing/StarItemSlotWidget.hpp @@ -19,6 +19,7 @@ public: bool sendEvent(InputEvent const& event) override; void setCallback(WidgetCallbackFunc callback); void setRightClickCallback(WidgetCallbackFunc callback); + void setMiddleClickCallback(WidgetCallbackFunc callback); void setItem(ItemPtr const& item); ItemPtr item() const; void setProgress(float progress); @@ -61,6 +62,7 @@ private: WidgetCallbackFunc m_callback; WidgetCallbackFunc m_rightClickCallback; + WidgetCallbackFunc m_middleClickCallback; float m_progress; ProgressWidgetPtr m_durabilityBar; |