Try to make Minecraft general page easier to understand - remove misc
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
910febeeb0
commit
1ce343fb97
2 changed files with 75 additions and 102 deletions
|
@ -68,7 +68,6 @@ MinecraftSettingsWidget::MinecraftSettingsWidget(MinecraftInstancePtr instance,
|
||||||
tr("<span style=\" font-weight:600; color:#f5c211;\">Warning</span><span style=\" color:#f5c211;\">: The maximized option is "
|
tr("<span style=\" font-weight:600; color:#f5c211;\">Warning</span><span style=\" color:#f5c211;\">: The maximized option is "
|
||||||
"not fully supported on this Minecraft version.</span>"));
|
"not fully supported on this Minecraft version.</span>"));
|
||||||
|
|
||||||
m_ui->miscellaneousSettingsBox->setCheckable(true);
|
|
||||||
m_ui->consoleSettingsBox->setCheckable(true);
|
m_ui->consoleSettingsBox->setCheckable(true);
|
||||||
m_ui->windowSizeGroupBox->setCheckable(true);
|
m_ui->windowSizeGroupBox->setCheckable(true);
|
||||||
m_ui->nativeWorkaroundsGroupBox->setCheckable(true);
|
m_ui->nativeWorkaroundsGroupBox->setCheckable(true);
|
||||||
|
@ -136,11 +135,14 @@ void MinecraftSettingsWidget::loadSettings()
|
||||||
settings = APPLICATION->settings();
|
settings = APPLICATION->settings();
|
||||||
|
|
||||||
// Game Window
|
// Game Window
|
||||||
m_ui->windowSizeGroupBox->setChecked(m_instance == nullptr || settings->get("OverrideWindow").toBool());
|
m_ui->windowSizeGroupBox->setChecked(m_instance == nullptr || settings->get("OverrideWindow").toBool() ||
|
||||||
|
settings->get("OverrideMiscellaneous").toBool());
|
||||||
m_ui->windowSizeGroupBox->setChecked(settings->get("OverrideWindow").toBool());
|
m_ui->windowSizeGroupBox->setChecked(settings->get("OverrideWindow").toBool());
|
||||||
m_ui->maximizedCheckBox->setChecked(settings->get("LaunchMaximized").toBool());
|
m_ui->maximizedCheckBox->setChecked(settings->get("LaunchMaximized").toBool());
|
||||||
m_ui->windowWidthSpinBox->setValue(settings->get("MinecraftWinWidth").toInt());
|
m_ui->windowWidthSpinBox->setValue(settings->get("MinecraftWinWidth").toInt());
|
||||||
m_ui->windowHeightSpinBox->setValue(settings->get("MinecraftWinHeight").toInt());
|
m_ui->windowHeightSpinBox->setValue(settings->get("MinecraftWinHeight").toInt());
|
||||||
|
m_ui->closeAfterLaunchCheck->setChecked(settings->get("CloseAfterLaunch").toBool());
|
||||||
|
m_ui->quitAfterGameStopCheck->setChecked(settings->get("QuitAfterGameStop").toBool());
|
||||||
|
|
||||||
// Game Time
|
// Game Time
|
||||||
m_ui->gameTimeGroupBox->setChecked(m_instance == nullptr || settings->get("OverrideGameTime").toBool());
|
m_ui->gameTimeGroupBox->setChecked(m_instance == nullptr || settings->get("OverrideGameTime").toBool());
|
||||||
|
@ -155,11 +157,6 @@ void MinecraftSettingsWidget::loadSettings()
|
||||||
m_ui->autoCloseConsoleCheck->setChecked(settings->get("AutoCloseConsole").toBool());
|
m_ui->autoCloseConsoleCheck->setChecked(settings->get("AutoCloseConsole").toBool());
|
||||||
m_ui->showConsoleErrorCheck->setChecked(settings->get("ShowConsoleOnError").toBool());
|
m_ui->showConsoleErrorCheck->setChecked(settings->get("ShowConsoleOnError").toBool());
|
||||||
|
|
||||||
// Miscellaneous
|
|
||||||
m_ui->miscellaneousSettingsBox->setChecked(settings->get("OverrideMiscellaneous").toBool());
|
|
||||||
m_ui->closeAfterLaunchCheck->setChecked(settings->get("CloseAfterLaunch").toBool());
|
|
||||||
m_ui->quitAfterGameStopCheck->setChecked(settings->get("QuitAfterGameStop").toBool());
|
|
||||||
|
|
||||||
if (m_javaSettings != nullptr)
|
if (m_javaSettings != nullptr)
|
||||||
m_javaSettings->loadSettings();
|
m_javaSettings->loadSettings();
|
||||||
|
|
||||||
|
@ -242,19 +239,6 @@ void MinecraftSettingsWidget::saveSettings()
|
||||||
{
|
{
|
||||||
SettingsObject::Lock lock(settings);
|
SettingsObject::Lock lock(settings);
|
||||||
|
|
||||||
// Miscellaneous
|
|
||||||
bool miscellaneous = m_instance == nullptr || m_ui->miscellaneousSettingsBox->isChecked();
|
|
||||||
|
|
||||||
if (m_instance != nullptr)
|
|
||||||
settings->set("OverrideMiscellaneous", miscellaneous);
|
|
||||||
|
|
||||||
if (miscellaneous) {
|
|
||||||
settings->set("CloseAfterLaunch", m_ui->closeAfterLaunchCheck->isChecked());
|
|
||||||
settings->set("QuitAfterGameStop", m_ui->quitAfterGameStopCheck->isChecked());
|
|
||||||
} else {
|
|
||||||
settings->reset("CloseAfterLaunch");
|
|
||||||
settings->reset("QuitAfterGameStop");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Console
|
// Console
|
||||||
bool console = m_instance == nullptr || m_ui->consoleSettingsBox->isChecked();
|
bool console = m_instance == nullptr || m_ui->consoleSettingsBox->isChecked();
|
||||||
|
@ -272,20 +256,26 @@ void MinecraftSettingsWidget::saveSettings()
|
||||||
settings->reset("ShowConsoleOnError");
|
settings->reset("ShowConsoleOnError");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Window Size
|
// Game Window
|
||||||
bool window = m_instance == nullptr || m_ui->windowSizeGroupBox->isChecked();
|
bool window = m_instance == nullptr || m_ui->windowSizeGroupBox->isChecked();
|
||||||
|
|
||||||
if (m_instance != nullptr)
|
if (m_instance != nullptr) {
|
||||||
settings->set("OverrideWindow", window);
|
settings->set("OverrideWindow", window);
|
||||||
|
settings->set("OverrideMiscellaneous", window);
|
||||||
|
}
|
||||||
|
|
||||||
if (window) {
|
if (window) {
|
||||||
settings->set("LaunchMaximized", m_ui->maximizedCheckBox->isChecked());
|
settings->set("LaunchMaximized", m_ui->maximizedCheckBox->isChecked());
|
||||||
settings->set("MinecraftWinWidth", m_ui->windowWidthSpinBox->value());
|
settings->set("MinecraftWinWidth", m_ui->windowWidthSpinBox->value());
|
||||||
settings->set("MinecraftWinHeight", m_ui->windowHeightSpinBox->value());
|
settings->set("MinecraftWinHeight", m_ui->windowHeightSpinBox->value());
|
||||||
|
settings->set("CloseAfterLaunch", m_ui->closeAfterLaunchCheck->isChecked());
|
||||||
|
settings->set("QuitAfterGameStop", m_ui->quitAfterGameStopCheck->isChecked());
|
||||||
} else {
|
} else {
|
||||||
settings->reset("LaunchMaximized");
|
settings->reset("LaunchMaximized");
|
||||||
settings->reset("MinecraftWinWidth");
|
settings->reset("MinecraftWinWidth");
|
||||||
settings->reset("MinecraftWinHeight");
|
settings->reset("MinecraftWinHeight");
|
||||||
|
settings->reset("CloseAfterLaunch");
|
||||||
|
settings->reset("QuitAfterGameStop");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Custom Commands
|
// Custom Commands
|
||||||
|
|
|
@ -58,9 +58,9 @@
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>-125</y>
|
<y>0</y>
|
||||||
<width>603</width>
|
<width>603</width>
|
||||||
<height>786</height>
|
<height>744</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
|
@ -200,6 +200,59 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="closeAfterLaunchCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>Close the launcher after the game window opens</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="quitAfterGameStopCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>Quit the launcher after the game window closes</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="consoleSettingsBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>&Console Window</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="showConsoleCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show console window while the game is running</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="autoCloseConsoleCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>Automatically close console window when the game quits</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="showConsoleErrorCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show console window when the game crashes</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -253,6 +306,13 @@
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QRadioButton" name="worldJoinButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Singleplayer world</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QRadioButton" name="serverJoinAddressButton">
|
<widget class="QRadioButton" name="serverJoinAddressButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -263,14 +323,7 @@
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QLineEdit" name="serverJoinAddress"/>
|
<widget class="QLineEdit" name="serverJoinAddress"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="2" column="2">
|
||||||
<widget class="QRadioButton" name="worldJoinButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Singleplayer world</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QComboBox" name="worldsCb"/>
|
<widget class="QComboBox" name="worldsCb"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -322,74 +375,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="consoleSettingsBox">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>&Console</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="showConsoleCheck">
|
|
||||||
<property name="text">
|
|
||||||
<string>Show console while the game is running</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="autoCloseConsoleCheck">
|
|
||||||
<property name="text">
|
|
||||||
<string>Automatically close console when the game quits</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="showConsoleErrorCheck">
|
|
||||||
<property name="text">
|
|
||||||
<string>Show console when the game crashes</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="miscellaneousSettingsBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>&Miscellaneous</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>false</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>
|
<item>
|
||||||
<spacer name="verticalSpacer_2">
|
<spacer name="verticalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -698,8 +683,6 @@
|
||||||
<tabstop>showConsoleCheck</tabstop>
|
<tabstop>showConsoleCheck</tabstop>
|
||||||
<tabstop>autoCloseConsoleCheck</tabstop>
|
<tabstop>autoCloseConsoleCheck</tabstop>
|
||||||
<tabstop>showConsoleErrorCheck</tabstop>
|
<tabstop>showConsoleErrorCheck</tabstop>
|
||||||
<tabstop>closeAfterLaunchCheck</tabstop>
|
|
||||||
<tabstop>quitAfterGameStopCheck</tabstop>
|
|
||||||
<tabstop>javaScrollArea</tabstop>
|
<tabstop>javaScrollArea</tabstop>
|
||||||
<tabstop>scrollArea_2</tabstop>
|
<tabstop>scrollArea_2</tabstop>
|
||||||
<tabstop>onlineFixes</tabstop>
|
<tabstop>onlineFixes</tabstop>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue