add in support for passing down the "natural" (or flipped) scrolling direction in the MouseWheelEvent event

This commit is contained in:
Edward Rudd
2014-11-23 21:09:54 -05:00
parent 70438be272
commit 5b5823eeb5
13 changed files with 33 additions and 15 deletions

View File

@@ -260,6 +260,7 @@ typedef struct SDL_MouseWheelEvent
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
Sint32 x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
Sint32 y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */
Uint32 direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
} SDL_MouseWheelEvent;
/**

View File

@@ -60,6 +60,15 @@ typedef enum
SDL_NUM_SYSTEM_CURSORS
} SDL_SystemCursor;
/**
* \brief Scroll direction types for the Scroll event
*/
typedef enum
{
SDL_MOUSEWHEEL_NORMAL, /**< The scroll direction is normal */
SDL_MOUSEWHEEL_FLIPPED /**< The scroll direction is flipped / natural */
} SDL_MouseWheelDirection;
/* Function prototypes */
/**