aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets
diff options
context:
space:
mode:
authorD G Turner2018-10-11 05:52:02 +0100
committerD G Turner2018-10-11 05:52:02 +0100
commitefcd857083122a669d9ba54d34a4b7aae07c245b (patch)
tree8ce8cc027a3570053190aafd13bf4013e9507edb /gui/widgets
parent6fc08fd2b145451b25d79e38e23db4efb4986f47 (diff)
downloadscummvm-rg350-efcd857083122a669d9ba54d34a4b7aae07c245b.tar.gz
scummvm-rg350-efcd857083122a669d9ba54d34a4b7aae07c245b.tar.bz2
scummvm-rg350-efcd857083122a669d9ba54d34a4b7aae07c245b.zip
GUI: Fix Mouse Wheel Input for Unknown Game Dialog.
This should also fix this for other instances of ScrollContainer, though the dialogs / widgets may require the same change. This fixes bug Trac #10741.
Diffstat (limited to 'gui/widgets')
-rw-r--r--gui/widgets/scrollcontainer.cpp4
-rw-r--r--gui/widgets/scrollcontainer.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/gui/widgets/scrollcontainer.cpp b/gui/widgets/scrollcontainer.cpp
index 3c2e7aae32..6578d26feb 100644
--- a/gui/widgets/scrollcontainer.cpp
+++ b/gui/widgets/scrollcontainer.cpp
@@ -49,6 +49,10 @@ void ScrollContainerWidget::init() {
recalc();
}
+void ScrollContainerWidget::handleMouseWheel(int x, int y, int direction) {
+ _verticalScroll->handleMouseWheel(x, y, direction);
+}
+
void ScrollContainerWidget::recalc() {
int scrollbarWidth = g_gui.xmlEval()->getVar("Globals.Scrollbar.Width", 0);
_limitH = _h;
diff --git a/gui/widgets/scrollcontainer.h b/gui/widgets/scrollcontainer.h
index c4b2f716e6..49326ac6e9 100644
--- a/gui/widgets/scrollcontainer.h
+++ b/gui/widgets/scrollcontainer.h
@@ -50,6 +50,7 @@ public:
Common::Rect getClipRect() const override;
+ void handleMouseWheel(int x, int y, int direction);
protected:
// We overload getChildY to make sure child widgets are positioned correctly.
// Essentially this compensates for the space taken up by the tab title header.