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:
parent
6cabd89be0
commit
84f341ec78
4 changed files with 14 additions and 1 deletions
|
@ -299,6 +299,7 @@ void LauncherCore::readInitialInformation() {
|
||||||
profile.lobbyURL = settings.value("lobbyURL", "").toString();
|
profile.lobbyURL = settings.value("lobbyURL", "").toString();
|
||||||
profile.rememberUsername = settings.value("rememberUsername", false).toBool();
|
profile.rememberUsername = settings.value("rememberUsername", false).toBool();
|
||||||
profile.rememberPassword = settings.value("rememberPassword", false).toBool();
|
profile.rememberPassword = settings.value("rememberPassword", false).toBool();
|
||||||
|
profile.useSteam = settings.value("useSteam", false).toBool();
|
||||||
|
|
||||||
profile.useDX9 = settings.value("useDX9", false).toBool();
|
profile.useDX9 = settings.value("useDX9", false).toBool();
|
||||||
profile.useEsync = settings.value("useEsync", false).toBool();
|
profile.useEsync = settings.value("useEsync", false).toBool();
|
||||||
|
@ -476,6 +477,7 @@ void LauncherCore::saveSettings() {
|
||||||
settings.setValue("lobbyURL", profile.lobbyURL);
|
settings.setValue("lobbyURL", profile.lobbyURL);
|
||||||
settings.setValue("rememberUsername", profile.rememberUsername);
|
settings.setValue("rememberUsername", profile.rememberUsername);
|
||||||
settings.setValue("rememberPassword", profile.rememberPassword);
|
settings.setValue("rememberPassword", profile.rememberPassword);
|
||||||
|
settings.setValue("useSteam", profile.useSteam);
|
||||||
|
|
||||||
settings.setValue("enableDalamud", profile.enableDalamud);
|
settings.setValue("enableDalamud", profile.enableDalamud);
|
||||||
settings.setValue("enableWatchdog", profile.enableWatchdog);
|
settings.setValue("enableWatchdog", profile.enableWatchdog);
|
||||||
|
|
|
@ -44,6 +44,7 @@ struct ProfileSettings {
|
||||||
bool isSapphire = false;
|
bool isSapphire = false;
|
||||||
QString lobbyURL;
|
QString lobbyURL;
|
||||||
bool rememberUsername = false, rememberPassword = false;
|
bool rememberUsername = false, rememberPassword = false;
|
||||||
|
bool useSteam = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LoginInformation {
|
struct LoginInformation {
|
||||||
|
|
|
@ -163,6 +163,14 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, LauncherCore& core, QWidg
|
||||||
});
|
});
|
||||||
loginBoxLayout->addRow("Remember Password?", rememberPasswordBox);
|
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)
|
#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
|
||||||
auto wineBox = new QGroupBox("Wine Options");
|
auto wineBox = new QGroupBox("Wine Options");
|
||||||
auto wineBoxLayout = new QFormLayout();
|
auto wineBoxLayout = new QFormLayout();
|
||||||
|
@ -367,6 +375,7 @@ void SettingsWindow::reloadControls() {
|
||||||
lobbyServerURL->setText(profile.lobbyURL);
|
lobbyServerURL->setText(profile.lobbyURL);
|
||||||
rememberUsernameBox->setChecked(profile.rememberUsername);
|
rememberUsernameBox->setChecked(profile.rememberUsername);
|
||||||
rememberPasswordBox->setChecked(profile.rememberPassword);
|
rememberPasswordBox->setChecked(profile.rememberPassword);
|
||||||
|
useSteamBox->setChecked(profile.useSteam);
|
||||||
|
|
||||||
enableDalamudBox->setChecked(profile.enableDalamud);
|
enableDalamudBox->setChecked(profile.enableDalamud);
|
||||||
|
|
||||||
|
|
|
@ -47,9 +47,10 @@ private:
|
||||||
QComboBox* serverType = nullptr;
|
QComboBox* serverType = nullptr;
|
||||||
QLineEdit* lobbyServerURL = nullptr;
|
QLineEdit* lobbyServerURL = nullptr;
|
||||||
QCheckBox* rememberUsernameBox = nullptr, *rememberPasswordBox = nullptr;
|
QCheckBox* rememberUsernameBox = nullptr, *rememberPasswordBox = nullptr;
|
||||||
|
QCheckBox* useSteamBox = nullptr;
|
||||||
|
|
||||||
bool currentlyReloadingControls = false;
|
bool currentlyReloadingControls = false;
|
||||||
|
|
||||||
LauncherWindow& window;
|
LauncherWindow& window;
|
||||||
LauncherCore& core;
|
LauncherCore& core;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue