mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 06:39:17 +00:00
WAGE: Made save dialog functional
This commit is contained in:
parent
f11721d036
commit
6c205ad46d
@ -140,8 +140,8 @@ void WageEngine::processEvents() {
|
||||
while (_eventMan->pollEvent(event)) {
|
||||
switch (event.type) {
|
||||
case Common::EVENT_QUIT:
|
||||
saveDialog();
|
||||
_shouldQuit = true;
|
||||
if (saveDialog())
|
||||
_shouldQuit = true;
|
||||
break;
|
||||
case Common::EVENT_MOUSEMOVE:
|
||||
_gui->mouseMove(event.mouse.x, event.mouse.y);
|
||||
@ -230,7 +230,7 @@ void WageEngine::gameOver() {
|
||||
doClose();
|
||||
}
|
||||
|
||||
void WageEngine::saveDialog() {
|
||||
bool WageEngine::saveDialog() {
|
||||
DialogButtonArray buttons;
|
||||
|
||||
buttons.push_back(new DialogButton("No", 19, 67, 68, 28));
|
||||
@ -239,9 +239,21 @@ void WageEngine::saveDialog() {
|
||||
|
||||
Dialog save(_gui, 291, "Save changes before closing?", &buttons, 1);
|
||||
|
||||
save.run();
|
||||
int button = save.run();
|
||||
|
||||
if (button == 2) // Cancel
|
||||
return false;
|
||||
|
||||
if (button == 1)
|
||||
saveGame();
|
||||
|
||||
doClose();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void WageEngine::saveGame() {
|
||||
warning("STUB: saveGame()");
|
||||
}
|
||||
|
||||
void WageEngine::performInitialSetup() {
|
||||
|
@ -162,7 +162,7 @@ public:
|
||||
void appendText(String &str);
|
||||
void appendText(char *str);
|
||||
void gameOver();
|
||||
void saveDialog();
|
||||
bool saveDialog();
|
||||
Obj *getOffer();
|
||||
Chr *getMonster();
|
||||
void processEvents();
|
||||
@ -170,6 +170,7 @@ public:
|
||||
void onMove(Designed *what, Designed *from, Designed *to);
|
||||
void encounter(Chr *player, Chr *chr);
|
||||
void redrawScene();
|
||||
void saveGame();
|
||||
|
||||
private:
|
||||
Console *_console;
|
||||
|
Loading…
Reference in New Issue
Block a user