From fc35e19915b76cdf20ee8a41a6e0a600a6ba0e26 Mon Sep 17 00:00:00 2001 From: Shadooow Date: Tue, 25 May 2021 18:20:13 +0000 Subject: [PATCH] allowed the meanwhile popup box to be handled with keyboard - ESC or n to skip ENTER or o for prompt git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9049 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- MessageBoxScreen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MessageBoxScreen.cpp b/MessageBoxScreen.cpp index 3d8c4208..d31d9ffc 100644 --- a/MessageBoxScreen.cpp +++ b/MessageBoxScreen.cpp @@ -1545,7 +1545,7 @@ UINT32 MessageBoxScreenHandle( ) { if( ( InputEvent.usParam == ESC ) || ( InputEvent.usParam == 'n') ) { - if ( gMsgBox.usFlags & MSG_BOX_FLAG_YESNO ) + if ( gMsgBox.usFlags & MSG_BOX_FLAG_YESNO || gMsgBox.usFlags & MSG_BOX_FLAG_OKSKIP) { // Exit messagebox gMsgBox.bHandled = MSG_BOX_RETURN_NO; @@ -1571,7 +1571,7 @@ UINT32 MessageBoxScreenHandle( ) // Exit messagebox gMsgBox.bHandled = MSG_BOX_RETURN_YES; } - else if( gMsgBox.usFlags & MSG_BOX_FLAG_OK ) + else if( gMsgBox.usFlags & MSG_BOX_FLAG_OK || gMsgBox.usFlags & MSG_BOX_FLAG_OKSKIP) { // Exit messagebox gMsgBox.bHandled = MSG_BOX_RETURN_OK; @@ -1593,7 +1593,7 @@ UINT32 MessageBoxScreenHandle( ) if( InputEvent.usParam == 'o' ) { - if( gMsgBox.usFlags & MSG_BOX_FLAG_OK ) + if( gMsgBox.usFlags & MSG_BOX_FLAG_OK || gMsgBox.usFlags & MSG_BOX_FLAG_OKSKIP) { // Exit messagebox gMsgBox.bHandled = MSG_BOX_RETURN_OK;