Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit bce35de

Browse files
committed
Pressing escape at the options screen no longer quits the game.
1 parent 3316949 commit bce35de

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
256256

257257
- The "woosh" sound played when switching actors from a distance will now take scene wrapping into account. Additionally, attempting to switch to previous or next actor with only one actor will play the more correct "error" sound.
258258

259+
- Pressing escape at the options screen no longer quits the game.
260+
259261
### Removed
260262

261263
- Removed the ability to remove scripts from objects with Lua. This is no longer needed cause of code efficiency increases.

Menus/MainMenuGUI.cpp

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,26 @@ void MainMenuGUI::Update()
635635
return;
636636

637637
// If esc pressed, show quit dialog if applicable
638-
if (g_UInputMan.KeyPressed(KEY_ESC))
639-
QuitLogic();
638+
if (g_UInputMan.KeyPressed(KEY_ESC)) {
639+
if (m_MenuScreen != OPTIONSSCREEN) {
640+
QuitLogic();
641+
} else {
642+
HideAllScreens();
643+
m_MainMenuButtons[BACKTOMAIN]->SetVisible(false);
644+
645+
g_SettingsMan.SetFlashOnBrainDamage(m_aOptionsCheckbox[FLASHONBRAINDAMAGE]->GetCheck());
646+
g_SettingsMan.SetBlipOnRevealUnseen(m_aOptionsCheckbox[BLIPONREVEALUNSEEN]->GetCheck());
647+
g_SettingsMan.SetShowForeignItems(m_aOptionsCheckbox[SHOWFOREIGNITEMS]->GetCheck());
648+
g_SettingsMan.SetShowToolTips(m_aOptionsCheckbox[SHOWTOOLTIPS]->GetCheck());
649+
g_SettingsMan.SetPreciseCollisions(m_aOptionsCheckbox[PRECISECOLLISIONS]->GetCheck());
650+
g_SettingsMan.UpdateSettingsFile();
651+
652+
m_MenuScreen = MAINSCREEN;
653+
m_ScreenChange = true;
654+
655+
g_GUISound.BackButtonPressSound()->Play();
656+
}
657+
}
640658

641659
////////////////////////////////////////////////////////////////////////
642660
// Animate the menu into and out of view if enabled or disabled

0 commit comments

Comments
 (0)