1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 12:47:44 +00:00

Add non-functional (for now) Steam option

This commit is contained in:
Joshua Goins 2022-01-30 16:51:49 -05:00
parent 6cabd89be0
commit 84f341ec78
4 changed files with 14 additions and 1 deletions

View file

@ -299,6 +299,7 @@ void LauncherCore::readInitialInformation() {
profile.lobbyURL = settings.value("lobbyURL", "").toString();
profile.rememberUsername = settings.value("rememberUsername", false).toBool();
profile.rememberPassword = settings.value("rememberPassword", false).toBool();
profile.useSteam = settings.value("useSteam", false).toBool();
profile.useDX9 = settings.value("useDX9", false).toBool();
profile.useEsync = settings.value("useEsync", false).toBool();
@ -476,6 +477,7 @@ void LauncherCore::saveSettings() {
settings.setValue("lobbyURL", profile.lobbyURL);
settings.setValue("rememberUsername", profile.rememberUsername);
settings.setValue("rememberPassword", profile.rememberPassword);
settings.setValue("useSteam", profile.useSteam);
settings.setValue("enableDalamud", profile.enableDalamud);
settings.setValue("enableWatchdog", profile.enableWatchdog);

View file

@ -44,6 +44,7 @@ struct ProfileSettings {
bool isSapphire = false;
QString lobbyURL;
bool rememberUsername = false, rememberPassword = false;
bool useSteam = false;
};
struct LoginInformation {

View file

@ -163,6 +163,14 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, LauncherCore& core, QWidg
});
loginBoxLayout->addRow("Remember Password?", rememberPasswordBox);
useSteamBox = new QCheckBox();
connect(useSteamBox, &QCheckBox::stateChanged, [=](int) {
getCurrentProfile().useSteam = useSteamBox->isChecked();
this->core.saveSettings();
});
loginBoxLayout->addRow("Use Steam?", useSteamBox);
#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
auto wineBox = new QGroupBox("Wine Options");
auto wineBoxLayout = new QFormLayout();
@ -367,6 +375,7 @@ void SettingsWindow::reloadControls() {
lobbyServerURL->setText(profile.lobbyURL);
rememberUsernameBox->setChecked(profile.rememberUsername);
rememberPasswordBox->setChecked(profile.rememberPassword);
useSteamBox->setChecked(profile.useSteam);
enableDalamudBox->setChecked(profile.enableDalamud);

View file

@ -47,6 +47,7 @@ private:
QComboBox* serverType = nullptr;
QLineEdit* lobbyServerURL = nullptr;
QCheckBox* rememberUsernameBox = nullptr, *rememberPasswordBox = nullptr;
QCheckBox* useSteamBox = nullptr;
bool currentlyReloadingControls = false;