diff options
Diffstat (limited to 'src/settingsdialogworkarounds.cpp')
| -rw-r--r-- | src/settingsdialogworkarounds.cpp | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/src/settingsdialogworkarounds.cpp b/src/settingsdialogworkarounds.cpp index c050c722..17b2259b 100644 --- a/src/settingsdialogworkarounds.cpp +++ b/src/settingsdialogworkarounds.cpp @@ -8,25 +8,26 @@ WorkaroundsSettingsTab::WorkaroundsSettingsTab(Settings& s, SettingsDialog& d) : SettingsTab(s, d) { - ui->appIDEdit->setText(settings().steam().appID()); - - LoadMechanism::EMechanism mechanismID = settings().game().loadMechanismType(); - int index = 0; - - if (settings().game().loadMechanism().isDirectLoadingSupported()) { - ui->mechanismBox->addItem(QObject::tr("Mod Organizer"), LoadMechanism::LOAD_MODORGANIZER); - if (mechanismID == LoadMechanism::LOAD_MODORGANIZER) { - index = ui->mechanismBox->count() - 1; - } - } - - ui->mechanismBox->setCurrentIndex(index); - - ui->hideUncheckedBox->setChecked(settings().game().hideUncheckedPlugins()); + // options ui->forceEnableBox->setChecked(settings().game().forceEnableCoreFiles()); ui->lockGUIBox->setChecked(settings().interface().lockGUI()); ui->enableArchiveParsingBox->setChecked(settings().archiveParsing()); + // steam + QString username, password; + settings().steam().login(username, password); + + ui->appIDEdit->setText(settings().steam().appID()); + ui->steamUserEdit->setText(username); + ui->steamPassEdit->setText(password); + + // network + ui->offlineBox->setChecked(settings().network().offlineMode()); + ui->proxyBox->setChecked(settings().network().useProxy()); + ui->useCustomBrowser->setChecked(settings().network().useCustomBrowser()); + ui->browserCommand->setText(settings().network().customBrowserCommand()); + + // buttons m_ExecutableBlacklist = settings().executablesBlacklist(); QObject::connect(ui->bsaDateBtn, &QPushButton::clicked, [&]{ on_bsaDateBtn_clicked(); }); @@ -36,19 +37,26 @@ WorkaroundsSettingsTab::WorkaroundsSettingsTab(Settings& s, SettingsDialog& d) void WorkaroundsSettingsTab::update() { + // options + settings().game().setForceEnableCoreFiles(ui->forceEnableBox->isChecked()); + settings().interface().setLockGUI(ui->lockGUIBox->isChecked()); + settings().setArchiveParsing(ui->enableArchiveParsingBox->isChecked()); + + // steam if (ui->appIDEdit->text() != settings().game().plugin()->steamAPPId()) { settings().steam().setAppID(ui->appIDEdit->text()); } else { settings().steam().setAppID(""); } + settings().steam().setLogin(ui->steamUserEdit->text(), ui->steamPassEdit->text()); - settings().game().setLoadMechanism(static_cast<LoadMechanism::EMechanism>( - ui->mechanismBox->itemData(ui->mechanismBox->currentIndex()).toInt())); + // network + settings().network().setOfflineMode(ui->offlineBox->isChecked()); + settings().network().setUseProxy(ui->proxyBox->isChecked()); + settings().network().setUseCustomBrowser(ui->useCustomBrowser->isChecked()); + settings().network().setCustomBrowserCommand(ui->browserCommand->text()); - settings().game().setHideUncheckedPlugins(ui->hideUncheckedBox->isChecked()); - settings().game().setForceEnableCoreFiles(ui->forceEnableBox->isChecked()); - settings().interface().setLockGUI(ui->lockGUIBox->isChecked()); - settings().setArchiveParsing(ui->enableArchiveParsingBox->isChecked()); + // buttons settings().setExecutablesBlacklist(m_ExecutableBlacklist); } |
