diff options
author | Alexander Tkachev | 2016-06-16 21:04:10 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | c2c2ba908ff916e0ba680596bb1b565069255a67 (patch) | |
tree | 675635b8551a9efe38a8a931aec9040ef46ff23c /gui | |
parent | 5176eaba81f4cda6cd5a14108c3516abd8ba0c84 (diff) | |
download | scummvm-rg350-c2c2ba908ff916e0ba680596bb1b565069255a67.tar.gz scummvm-rg350-c2c2ba908ff916e0ba680596bb1b565069255a67.tar.bz2 scummvm-rg350-c2c2ba908ff916e0ba680596bb1b565069255a67.zip |
GUI: Hide StorageWizardDialog fields if server present
Diffstat (limited to 'gui')
-rw-r--r-- | gui/storagewizarddialog.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gui/storagewizarddialog.cpp b/gui/storagewizarddialog.cpp index c2759f2ae6..88826c2fb8 100644 --- a/gui/storagewizarddialog.cpp +++ b/gui/storagewizarddialog.cpp @@ -53,11 +53,14 @@ StorageWizardDialog::StorageWizardDialog(uint32 storageId): case Cloud::kStorageOneDriveId: url += "od"; break; case Cloud::kStorageGoogleDriveId: url += "gd"; break; } +#ifdef USE_SDL_NET + url += "s"; +#endif new StaticTextWidget(this, "GlobalOptions_Cloud_ConnectionWizard.URLLine", url); - new StaticTextWidget(this, "GlobalOptions_Cloud_ConnectionWizard.ReturnLine1", _s("Obtain the code from the storage, enter it")); - new StaticTextWidget(this, "GlobalOptions_Cloud_ConnectionWizard.ReturnLine2", _s("in the following field and press 'Connect':")); + StaticTextWidget *returnLine1 = new StaticTextWidget(this, "GlobalOptions_Cloud_ConnectionWizard.ReturnLine1", _s("Obtain the code from the storage, enter it")); + StaticTextWidget *returnLine2 = new StaticTextWidget(this, "GlobalOptions_Cloud_ConnectionWizard.ReturnLine2", _s("in the following field and press 'Connect':")); for (uint32 i = 0; i < CODE_FIELDS; ++i) _codeWidget[i] = new EditTextWidget(this, "GlobalOptions_Cloud_ConnectionWizard.CodeBox" + Common::String::format("%d", i+1), "", 0, kCodeBoxCmd); _messageWidget = new StaticTextWidget(this, "GlobalOptions_Cloud_ConnectionWizard.MessageLine", ""); @@ -65,6 +68,16 @@ StorageWizardDialog::StorageWizardDialog(uint32 storageId): // Buttons new ButtonWidget(this, "GlobalOptions_Cloud_ConnectionWizard.CancelButton", _("Cancel"), 0, kCloseCmd); _connectWidget = new ButtonWidget(this, "GlobalOptions_Cloud_ConnectionWizard.ConnectButton", _("Connect"), 0, kConnectCmd); + +#ifdef USE_SDL_NET + // hide fields and even the button if local webserver is on + returnLine1->setLabel(_s("You would be navigated to ScummVM's page")); + returnLine2->setLabel(_s("when you'd allow it to use your storage.")); + for (uint32 i = 0; i < CODE_FIELDS; ++i) + _codeWidget[i]->setVisible(false); + _messageWidget->setVisible(false); + _connectWidget->setVisible(false); +#endif } void StorageWizardDialog::open() { |