aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/dialogs.cpp4
-rw-r--r--engines/scumm/dialogs.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index dd4569ca76..f3bc6f3216 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -233,7 +233,7 @@ ScummMenuDialog::ScummMenuDialog(ScummEngine *scumm)
new GUI::ButtonWidget(this, "ScummMain.Resume", "Resume", kPlayCmd, 'P');
- new GUI::ButtonWidget(this, "ScummMain.Load", "Load", kLoadCmd, 'L');
+ _loadButton = new GUI::ButtonWidget(this, "ScummMain.Load", "Load", kLoadCmd, 'L');
_saveButton = new GUI::ButtonWidget(this, "ScummMain.Save", "Save", kSaveCmd, 'S');
new GUI::ButtonWidget(this, "ScummMain.Options", "Options", kOptionsCmd, 'O');
@@ -269,11 +269,13 @@ ScummMenuDialog::~ScummMenuDialog() {
}
int ScummMenuDialog::runModal() {
+ _loadButton->setEnabled(_vm->canLoadGameStateCurrently());
_saveButton->setEnabled(_vm->canSaveGameStateCurrently());
return ScummDialog::runModal();
}
void ScummMenuDialog::reflowLayout() {
+ _loadButton->setEnabled(_vm->canLoadGameStateCurrently());
_saveButton->setEnabled(_vm->canSaveGameStateCurrently());
Dialog::reflowLayout();
}
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 29cee93573..bda0adf9ea 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -75,6 +75,7 @@ protected:
GUI::SaveLoadChooser *_saveDialog;
GUI::SaveLoadChooser *_loadDialog;
+ GUI::ButtonWidget *_loadButton;
GUI::ButtonWidget *_saveButton;
void save();