mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +00:00
Support for 9th mouse key (by Tolsi)
This commit is contained in:
parent
0d819aba4d
commit
c90568ce71
|
@ -36,6 +36,7 @@ print >>f, "\tKEY_MOUSE_7 = %d,"%(highestid+7); keynames[highestid+7] = "mouse7"
|
|||
print >>f, "\tKEY_MOUSE_8 = %d,"%(highestid+8); keynames[highestid+8] = "mouse8"
|
||||
print >>f, "\tKEY_MOUSE_WHEEL_UP = %d,"%(highestid+9); keynames[highestid+9] = "mousewheelup"
|
||||
print >>f, "\tKEY_MOUSE_WHEEL_DOWN = %d,"%(highestid+10); keynames[highestid+10] = "mousewheeldown"
|
||||
print >>f, "\tKEY_MOUSE_9 = %d,"%(highestid+11); keynames[highestid+11] = "mouse9"
|
||||
print >>f, "\tKEY_LAST,"
|
||||
|
||||
print >>f, "};"
|
||||
|
|
|
@ -144,6 +144,7 @@ int CInput::Update()
|
|||
if(i&SDL_BUTTON(6)) m_aInputState[m_InputCurrent][KEY_MOUSE_6] = 1;
|
||||
if(i&SDL_BUTTON(7)) m_aInputState[m_InputCurrent][KEY_MOUSE_7] = 1;
|
||||
if(i&SDL_BUTTON(8)) m_aInputState[m_InputCurrent][KEY_MOUSE_8] = 1;
|
||||
if(i&SDL_BUTTON(9)) m_aInputState[m_InputCurrent][KEY_MOUSE_9] = 1;
|
||||
|
||||
{
|
||||
SDL_Event Event;
|
||||
|
@ -186,6 +187,7 @@ int CInput::Update()
|
|||
if(Event.button.button == 6) Key = KEY_MOUSE_6; // ignore_convention
|
||||
if(Event.button.button == 7) Key = KEY_MOUSE_7; // ignore_convention
|
||||
if(Event.button.button == 8) Key = KEY_MOUSE_8; // ignore_convention
|
||||
if(Event.button.button == 9) Key = KEY_MOUSE_9; // ignore_convention
|
||||
break;
|
||||
|
||||
// other messages
|
||||
|
|
|
@ -343,7 +343,7 @@ const char g_aaKeyStrings[512][16] =
|
|||
"mouse8",
|
||||
"mousewheelup",
|
||||
"mousewheeldown",
|
||||
"&333",
|
||||
"mouse9",
|
||||
"&334",
|
||||
"&335",
|
||||
"&336",
|
||||
|
|
|
@ -248,6 +248,7 @@ enum
|
|||
KEY_MOUSE_8 = 330,
|
||||
KEY_MOUSE_WHEEL_UP = 331,
|
||||
KEY_MOUSE_WHEEL_DOWN = 332,
|
||||
KEY_MOUSE_9 = 333,
|
||||
KEY_LAST,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue