STARK: Enable QuitGame dialog

This commit is contained in:
Douglas Liu 2018-06-30 16:44:45 +08:00
parent b8a8acb7bf
commit d57ac332fc
3 changed files with 33 additions and 3 deletions

View File

@ -26,6 +26,8 @@
#include "engines/stark/services/services.h"
#include "engines/stark/services/diary.h"
#include "engines/stark/services/userinterface.h"
#include "engines/stark/services/gamemessage.h"
#include "engines/stark/ui/cursor.h"
#include "common/translation.h"
@ -122,7 +124,9 @@ void DiaryIndexScreen::backHandler() {
}
void DiaryIndexScreen::quitHandler() {
StarkUserInterface->requestQuitToMainMenu();
if (StarkGameMessage->alert(GameMessage::kQuitGamePrompt)) {
StarkUserInterface->requestQuitToMainMenu();
}
}
void DiaryIndexScreen::loadHandler() {

View File

@ -34,6 +34,7 @@
#include "engines/stark/services/global.h"
#include "engines/stark/services/services.h"
#include "engines/stark/services/userinterface.h"
#include "engines/stark/services/gamemessage.h"
#include "engines/stark/visual/image.h"
@ -132,8 +133,9 @@ void TopMenu::onClick(const Common::Point &pos) {
}
if (_exitButton->containsPoint(pos)) {
// TODO: Confirmation dialog
StarkUserInterface->requestQuitToMainMenu();
if (StarkGameMessage->alert(GameMessage::kQuitGamePrompt)) {
StarkUserInterface->requestQuitToMainMenu();
}
}
if (_inventoryButton->containsPoint(pos)) {

24
sh.exe.stackdump Normal file
View File

@ -0,0 +1,24 @@
MSYS-1.0.11 Build:2009-07-11 17:46
Exception: STATUS_ACCESS_VIOLATION at eip=710837B8
eax=0A03093F ebx=00001000 ecx=00000250 edx=00000000 esi=0A030FFF edi=006CF064
ebp=006CC914 esp=006CC908 program=C:\msys\1.0\bin\sh.exe
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame Function Args
006CC914 710837B8 (006CE9A4, 0A03093F, 00001000, 00000001)
006CE944 71015020 (000003B6, 006CE9A4, 000003B6, 0A03093F)
006CF9A4 71017AD8 (71115784, 0A03093F, 0A0109D0, 71096ECA)
006CF9E4 7101800E (71115784, 0A0109A0, 00000030, 7105C0DF)
006CFA24 7105C1AF (00000001, 0A0109A0, 00000030, 7105B254)
006CFA44 7108F2F4 (71098020, 00000001, 0A0109A0, 00000030)
006CFA74 7108EADA (7109825C, 0A0109A0, 00000030, 00000000)
006CFAA4 710823B2 (7109825C, 7109825C, 00462934, 006CFB14)
006CFAD4 71080FA0 (0000000A, 7109825C, 006CFB10, 7102D024)
006CFB04 71083C18 (0000000A, 7109825C, 006CFB44, 00447780)
006CFB44 00462B79 (0A017950, 00000015, 006CFBA4, 0045506F)
006CFB84 00414778 (00462938, 0A017920, 00000000, 00000000)
006CFBB4 00415182 (0A017920, 00462938, 00000000, 00000000)
006CFC14 00414462 (0A016AB8, FFFFFFFF, FFFFFFFF, 00000000)
006CFC74 004110CE (0A016AA0, 00000000, FFFFFFFF, FFFFFFFF)
006CFCC4 00410A8B (0A016AA0, 004558C6, 006CFD04, 00447780)
End of stack trace (more stack frames may be present)