changeset 451:24edec3cafe4

Added SDL_BUTTON_WHEELUP (4) and SDL_BUTTON_WHEELDOWN (5)
author Sam Lantinga <slouken@libsdl.org>
date Mon, 19 Aug 2002 18:09:44 +0000
parents 8a43e0cbf02f
children 4c5c10383201
files WhatsNew docs.html include/SDL_mouse.h src/video/wincommon/SDL_sysevents.c
diffstat 4 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/WhatsNew	Mon Aug 19 17:58:08 2002 +0000
+++ b/WhatsNew	Mon Aug 19 18:09:44 2002 +0000
@@ -3,6 +3,11 @@
 
 Version 1.0:
 
+1.2.5:
+	Added SDL_BUTTON_WHEELUP (4) and SDL_BUTTON_WHEELDOWN (5)
+
+	Added SDL_GL_STEREO for stereoscopic OpenGL contexts
+
 1.2.0:
 	Added SDL_VIDEOEXPOSE event to signal that the screen needs to
 	be redrawn.  This is currently only delivered to OpenGL windows
--- a/docs.html	Mon Aug 19 17:58:08 2002 +0000
+++ b/docs.html	Mon Aug 19 18:09:44 2002 +0000
@@ -16,6 +16,7 @@
 Major changes since SDL 1.0.0:
 </H2>
 <UL>
+	<LI> 1.2.5: Added SDL_BUTTON_WHEELUP (4) and SDL_BUTTON_WHEELDOWN (5)
 	<LI> 1.2.5: Added SDL_GL_STEREO for stereoscopic OpenGL contexts
 	<LI> 1.2.5: Fixed VidMode error when running on XFree86 3.3
 	<LI> 1.2.5: Added initial support for PicoGUI (thanks Micah!)
--- a/include/SDL_mouse.h	Mon Aug 19 17:58:08 2002 +0000
+++ b/include/SDL_mouse.h	Mon Aug 19 18:09:44 2002 +0000
@@ -117,11 +117,15 @@
    Button 1:	Left mouse button
    Button 2:	Middle mouse button
    Button 3:	Right mouse button
+   Button 4:	Mouse wheel up	 (may also be a real button)
+   Button 5:	Mouse wheel down (may also be a real button)
  */
 #define SDL_BUTTON(X)		(SDL_PRESSED<<(X-1))
 #define SDL_BUTTON_LEFT		1
 #define SDL_BUTTON_MIDDLE	2
 #define SDL_BUTTON_RIGHT	3
+#define SDL_BUTTON_WHEELUP	4
+#define SDL_BUTTON_WHEELDOWN	5
 #define SDL_BUTTON_LMASK	SDL_BUTTON(SDL_BUTTON_LEFT)
 #define SDL_BUTTON_MMASK	SDL_BUTTON(SDL_BUTTON_MIDDLE)
 #define SDL_BUTTON_RMASK	SDL_BUTTON(SDL_BUTTON_RIGHT)
--- a/src/video/wincommon/SDL_sysevents.c	Mon Aug 19 17:58:08 2002 +0000
+++ b/src/video/wincommon/SDL_sysevents.c	Mon Aug 19 18:09:44 2002 +0000
@@ -370,9 +370,9 @@
 				if ( move ) {
 					Uint8 button;
 					if ( move > 0 )
-						button = 4;
+						button = SDL_BUTTON_WHEELUP;
 					else
-						button = 5;
+						button = SDL_BUTTON_WHEELDOWN;
 					posted = SDL_PrivateMouseButton(
 						SDL_PRESSED, button, 0, 0);
 					posted |= SDL_PrivateMouseButton(