Esc should only open menu if shift isn't pressed (=> shift+esc for console)

When ingame, Shift-Esc would open the menu and another Shift-Esc the
console. Now it immediately opens the console and only Esc without
Shift opens the menu.
This commit is contained in:
Daniel Gibson 2015-10-03 18:58:49 +02:00
parent 08238d5ce0
commit 5ab546f67d

View file

@ -2148,7 +2148,9 @@ idSessionLocal::ProcessEvent
*/
bool idSessionLocal::ProcessEvent( const sysEvent_t *event ) {
// hitting escape anywhere brings up the menu
if ( !guiActive && event->evType == SE_KEY && event->evValue2 == 1 && event->evValue == K_ESCAPE ) {
// DG: but shift-escape should bring up console instead so ignore that
if ( !guiActive && event->evType == SE_KEY && event->evValue2 == 1
&& event->evValue == K_ESCAPE && !idKeyInput::IsDown( K_SHIFT ) ) {
console->Close();
if ( game ) {
idUserInterface *gui = NULL;