Add shortcuts to close game windows

This commit is contained in:
Alexander Batalov 2022-08-07 21:49:53 +03:00
parent 0cab26227a
commit 8ba4fa309d
3 changed files with 6 additions and 3 deletions

View File

@ -542,7 +542,8 @@ void inventoryOpen()
for (;;) {
int keyCode = _get_input();
if (keyCode == KEY_ESCAPE) {
// SFALL: Close with 'I'.
if (keyCode == KEY_ESCAPE || keyCode == KEY_UPPERCASE_I || keyCode == KEY_LOWERCASE_I) {
break;
}

View File

@ -444,7 +444,8 @@ int pipboyOpen(int intent)
break;
}
if (keyCode == 503 || keyCode == KEY_ESCAPE || keyCode == KEY_RETURN || keyCode == KEY_UPPERCASE_P || keyCode == KEY_LOWERCASE_P || _game_user_wants_to_quit != 0) {
// SFALL: Close with 'Z'.
if (keyCode == 503 || keyCode == KEY_ESCAPE || keyCode == KEY_RETURN || keyCode == KEY_UPPERCASE_P || keyCode == KEY_LOWERCASE_P || keyCode == KEY_UPPERCASE_Z || keyCode == KEY_LOWERCASE_Z || _game_user_wants_to_quit != 0) {
break;
}

View File

@ -121,7 +121,8 @@ int skilldexOpen()
while (rc == -1) {
int keyCode = _get_input();
if (keyCode == KEY_ESCAPE || keyCode == 500 || _game_user_wants_to_quit != 0) {
// SFALL: Close with 'S'.
if (keyCode == KEY_ESCAPE || keyCode == KEY_UPPERCASE_S || keyCode == KEY_LOWERCASE_S || keyCode == 500 || _game_user_wants_to_quit != 0) {
rc = 0;
} else if (keyCode == KEY_RETURN) {
soundPlayFile("ib1p1xx1");