Add UI for miscellaneous instance setting overrides
This commit is contained in:
parent
046f1e6e58
commit
3aea639fe4
@ -101,6 +101,20 @@ void InstanceSettingsPage::applySettings()
|
||||
{
|
||||
SettingsObject::Lock lock(m_settings);
|
||||
|
||||
// Miscellaneous
|
||||
bool miscellaneous = ui->miscellaneousSettingsBox->isChecked();
|
||||
m_settings->set("OverrideMiscellaneous", miscellaneous);
|
||||
if (miscellaneous)
|
||||
{
|
||||
m_settings->set("CloseAfterLaunch", ui->closeAfterLaunchCheck->isChecked());
|
||||
m_settings->set("QuitAfterGameStop", ui->quitAfterGameStopCheck->isChecked());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_settings->reset("CloseAfterLaunch");
|
||||
m_settings->reset("QuitAfterGameStop");
|
||||
}
|
||||
|
||||
// Console
|
||||
bool console = ui->consoleSettingsBox->isChecked();
|
||||
m_settings->set("OverrideConsole", console);
|
||||
@ -247,6 +261,11 @@ void InstanceSettingsPage::applySettings()
|
||||
|
||||
void InstanceSettingsPage::loadSettings()
|
||||
{
|
||||
// Miscellaneous
|
||||
ui->miscellaneousSettingsBox->setChecked(m_settings->get("OverrideMiscellaneous").toBool());
|
||||
ui->closeAfterLaunchCheck->setChecked(m_settings->get("CloseAfterLaunch").toBool());
|
||||
ui->quitAfterGameStopCheck->setChecked(m_settings->get("QuitAfterGameStop").toBool());
|
||||
|
||||
// Console
|
||||
ui->consoleSettingsBox->setChecked(m_settings->get("OverrideConsole").toBool());
|
||||
ui->showConsoleCheck->setChecked(m_settings->get("ShowConsole").toBool());
|
||||
|
@ -349,6 +349,35 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="miscellaneousSettingsBox">
|
||||
<property name="title">
|
||||
<string>Miscellaneous</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_12">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="closeAfterLaunchCheck">
|
||||
<property name="text">
|
||||
<string>Close the launcher after game window opens</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="quitAfterGameStopCheck">
|
||||
<property name="text">
|
||||
<string>Quit the launcher after game window closes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacerMinecraft_2">
|
||||
<property name="orientation">
|
||||
|
Loading…
Reference in New Issue
Block a user