mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-05-08 11:38:01 +03:00
CL_KeyEvent must not handle GUI mouse events, as it's the job of the UIWindowManager
This commit is contained in:
parent
d62242d653
commit
2fa568eb01
1 changed files with 100 additions and 98 deletions
|
@ -1132,15 +1132,18 @@ void CL_KeyEvent(int key, qboolean down, unsigned time)
|
|||
}
|
||||
}
|
||||
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_MOUSE3 || key == K_MOUSE4 || key == K_MOUSE5) {
|
||||
if (key >= K_MOUSE1 && key <= K_MOUSE5) {
|
||||
if (down) {
|
||||
cl.mouseButtons |= (1 << (key + (256 - K_MOUSE1)));
|
||||
} else {
|
||||
cl.mouseButtons &= ~(1 << (key + (256 - K_MOUSE1)));
|
||||
}
|
||||
|
||||
if (in_guimouse) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!in_guimouse || key <= K_MWHEELUP || key > K_JOY1) {
|
||||
// keys can still be used for bound actions
|
||||
if (down && (key <= K_BACKSPACE || key == K_MOUSE4) && (clc.demoplaying || clc.state == CA_CINEMATIC)
|
||||
&& Key_GetCatcher() == 0) {
|
||||
|
@ -1246,7 +1249,6 @@ void CL_KeyEvent(int key, qboolean down, unsigned time)
|
|||
|
||||
CL_AddKeyUpCommands(key, keys[key].binding, time);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue