diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp index 07af143c5fa..1e130ea34b6 100644 --- a/gui/widgets/tab.cpp +++ b/gui/widgets/tab.cpp @@ -318,6 +318,14 @@ bool TabWidget::handleKeyDown(Common::KeyState state) { return Widget::handleKeyDown(state); } +void TabWidget::handleMouseWheel(int x, int y, int direction) { + if (direction == 1) { + adjustTabs(kTabForwards); + } else { + adjustTabs(kTabBackwards); + } +} + void TabWidget::adjustTabs(int value) { // Determine which tab is next int tabID = _activeTab + value; diff --git a/gui/widgets/tab.h b/gui/widgets/tab.h index 3c33166ae38..fd92671948f 100644 --- a/gui/widgets/tab.h +++ b/gui/widgets/tab.h @@ -112,6 +112,7 @@ public: void handleMouseMoved(int x, int y, int button) override; void handleMouseLeft(int button) override { _lastRead = -1; }; bool handleKeyDown(Common::KeyState state) override; + void handleMouseWheel(int x, int y, int direction) override; void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override; virtual int getFirstVisible() const; virtual void setFirstVisible(int tabID, bool adjustIfRoom = false);