mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add support for mousewheelleft and mousewheelright
This commit is contained in:
parent
8753620e42
commit
aeec3c6396
|
@ -224,6 +224,8 @@ int CInput::Update()
|
||||||
case SDL_MOUSEWHEEL:
|
case SDL_MOUSEWHEEL:
|
||||||
if(Event.wheel.y > 0) Key = KEY_MOUSE_WHEEL_UP; // ignore_convention
|
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.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;
|
Action |= IInput::FLAG_RELEASE;
|
||||||
Scancode = Key;
|
Scancode = Key;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -428,8 +428,8 @@ const char g_aaKeyStrings[512][20] =
|
||||||
"mouse9",
|
"mouse9",
|
||||||
"mousewheelup",
|
"mousewheelup",
|
||||||
"mousewheeldown",
|
"mousewheeldown",
|
||||||
"&422",
|
"mousewheelleft",
|
||||||
"&423",
|
"mousewheelright",
|
||||||
"&424",
|
"&424",
|
||||||
"&425",
|
"&425",
|
||||||
"&426",
|
"&426",
|
||||||
|
|
|
@ -254,6 +254,8 @@ enum
|
||||||
KEY_MOUSE_9 = 419,
|
KEY_MOUSE_9 = 419,
|
||||||
KEY_MOUSE_WHEEL_UP = 420,
|
KEY_MOUSE_WHEEL_UP = 420,
|
||||||
KEY_MOUSE_WHEEL_DOWN = 421,
|
KEY_MOUSE_WHEEL_DOWN = 421,
|
||||||
|
KEY_MOUSE_WHEEL_LEFT = 422,
|
||||||
|
KEY_MOUSE_WHEEL_RIGHT = 423,
|
||||||
KEY_LAST,
|
KEY_LAST,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue