From a57fba4fa4bc303c63ec41f0ff8fc06fb7db710f Mon Sep 17 00:00:00 2001 From: MihailRis Date: Tue, 30 Jan 2024 22:47:51 +0300 Subject: [PATCH] inventory slots fix --- src/frontend/InventoryView.cpp | 4 ++++ src/frontend/InventoryView.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/frontend/InventoryView.cpp b/src/frontend/InventoryView.cpp index a09d64c1..c7488958 100644 --- a/src/frontend/InventoryView.cpp +++ b/src/frontend/InventoryView.cpp @@ -296,6 +296,10 @@ void SlotView::clicked(gui::GUI* gui, int button) { } } +void SlotView::focus(gui::GUI* gui) { + clicked(gui, 0); +} + InventoryView::InventoryView( const Content* content, LevelFrontend* frontend, diff --git a/src/frontend/InventoryView.h b/src/frontend/InventoryView.h index 6191d8c8..3f85d187 100644 --- a/src/frontend/InventoryView.h +++ b/src/frontend/InventoryView.h @@ -108,6 +108,7 @@ public: bool isHighlighted() const; virtual void clicked(gui::GUI*, int) override; + virtual void focus(gui::GUI*) override; }; class InventoryView : public gui::Container {