Add Mousewheel support for winboard. Play the moves foward and backward with
authorDaniel Mehrmann <mehrmann>
Mon, 9 Feb 2004 18:49:19 +0000 (18:49 +0000)
committerDaniel Mehrmann <mehrmann>
Mon, 9 Feb 2004 18:49:19 +0000 (18:49 +0000)
the Mousewheel.

winboard/winboard.c

index 32addcc..69146fc 100644 (file)
@@ -3108,7 +3108,16 @@ MouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
       dragInfo.lastpos = dragInfo.pos;\r
     }\r
     break;\r
-\r
+  case WM_MOUSEWHEEL:\r
+       /* Mouse Wheel is being rolled forward \r
+        * Play moves forward\r
+        */\r
+       if((short)HIWORD(wParam) > 0 ) ForwardEvent();\r
+       /* Mouse Wheel is being rolled backward \r
+        * Play moves backward\r
+        */\r
+       if((short)HIWORD(wParam) < 0 ) BackwardEvent();\r
+       break;\r
   case WM_MBUTTONDOWN:\r
   case WM_RBUTTONDOWN:\r
     ErrorPopDown();\r
@@ -3415,6 +3424,7 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
   case WM_MBUTTONUP:\r
   case WM_RBUTTONUP:\r
   case WM_MOUSEMOVE:\r
+  case WM_MOUSEWHEEL:\r
     MouseEvent(hwnd, message, wParam, lParam);\r
     break;\r
 \r