Add support for mousewheelleft and mousewheelright

This commit is contained in:
def 2016-06-21 15:31:28 +02:00
parent 8753620e42
commit aeec3c6396
3 changed files with 6 additions and 2 deletions

View file

@ -224,6 +224,8 @@ int CInput::Update()
case SDL_MOUSEWHEEL:
if(Event.wheel.y > 0) Key = KEY_MOUSE_WHEEL_UP; // ignore_convention
if(Event.wheel.y < 0) Key = KEY_MOUSE_WHEEL_DOWN; // ignore_convention
if(Event.wheel.x > 0) Key = KEY_MOUSE_WHEEL_LEFT; // ignore_convention
if(Event.wheel.x < 0) Key = KEY_MOUSE_WHEEL_RIGHT; // ignore_convention
Action |= IInput::FLAG_RELEASE;
Scancode = Key;
break;

View file

@ -428,8 +428,8 @@ const char g_aaKeyStrings[512][20] =
"mouse9",
"mousewheelup",
"mousewheeldown",
"&422",
"&423",
"mousewheelleft",
"mousewheelright",
"&424",
"&425",
"&426",

View file

@ -254,6 +254,8 @@ enum
KEY_MOUSE_9 = 419,
KEY_MOUSE_WHEEL_UP = 420,
KEY_MOUSE_WHEEL_DOWN = 421,
KEY_MOUSE_WHEEL_LEFT = 422,
KEY_MOUSE_WHEEL_RIGHT = 423,
KEY_LAST,
};