aboutsummaryrefslogtreecommitdiff
path: root/gui/dialog.cpp
diff options
context:
space:
mode:
authorMax Horn2002-10-16 20:32:12 +0000
committerMax Horn2002-10-16 20:32:12 +0000
commitb1766c28b276e102bed83652c467df9db270b3ac (patch)
tree238986ad281e0864aa46979c0f8bf40c950019ea /gui/dialog.cpp
parentd5bcb63f829f4c4aecd45cb60e492ca896ad77a5 (diff)
downloadscummvm-rg350-b1766c28b276e102bed83652c467df9db270b3ac.tar.gz
scummvm-rg350-b1766c28b276e102bed83652c467df9db270b3ac.tar.bz2
scummvm-rg350-b1766c28b276e102bed83652c467df9db270b3ac.zip
patch #620627: mouse wheel support for NewGui
svn-id: r5169
Diffstat (limited to 'gui/dialog.cpp')
-rw-r--r--gui/dialog.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp
index 09f76edb1c..679637967b 100644
--- a/gui/dialog.cpp
+++ b/gui/dialog.cpp
@@ -163,6 +163,21 @@ void Dialog::handleMouseUp(int x, int y, int button, int clickCount)
w->handleMouseUp(x - w->_x, y - w->_y, button, clickCount);
}
+void Dialog::handleMouseWheel(int x, int y, int direction)
+{
+ Widget *w;
+
+ // This may look a bit backwards, but I think it makes more sense for
+ // the mouse wheel to primarily affect the widget the mouse is at than
+ // the widget that happens to be focused.
+
+ w = findWidget(x, y);
+ if (!w)
+ w = _focusedWidget;
+ if (w)
+ w->handleMouseWheel(x, y, direction);
+}
+
void Dialog::handleKeyDown(char key, int modifiers)
{
if (_focusedWidget) {