From dadf1dbe9432629d4678df3174db6420e09b0ff3 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 25 May 2017 15:56:22 +0200 Subject: GUI: Fully hide GMM save/load buttons if not supported by engine Previously, they were only greyed out. According to the discussion on patch #8925, this was a limitation of the GUI layout engine when these buttons were introduced in 2008. This no longer seems to be a problem. --- engines/dialogs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp index 0867a101b0..14c0cb0c18 100644 --- a/engines/dialogs.cpp +++ b/engines/dialogs.cpp @@ -85,11 +85,11 @@ MainMenuDialog::MainMenuDialog(Engine *engine) new GUI::ButtonWidget(this, "GlobalMenu.Resume", _("~R~esume"), 0, kPlayCmd, 'P'); _loadButton = new GUI::ButtonWidget(this, "GlobalMenu.Load", _("~L~oad"), 0, kLoadCmd); - // TODO: setEnabled -> setVisible + _loadButton->setVisible(_engine->hasFeature(Engine::kSupportsLoadingDuringRuntime)); _loadButton->setEnabled(_engine->hasFeature(Engine::kSupportsLoadingDuringRuntime)); _saveButton = new GUI::ButtonWidget(this, "GlobalMenu.Save", _("~S~ave"), 0, kSaveCmd); - // TODO: setEnabled -> setVisible + _saveButton->setVisible(_engine->hasFeature(Engine::kSupportsSavingDuringRuntime)); _saveButton->setEnabled(_engine->hasFeature(Engine::kSupportsSavingDuringRuntime)); new GUI::ButtonWidget(this, "GlobalMenu.Options", _("~O~ptions"), 0, kOptionsCmd); -- cgit v1.2.3