Unify instance and global settings pt.1

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2024-11-06 23:46:30 +00:00
parent 4a92573235
commit e6d4e5d78d
13 changed files with 1244 additions and 1099 deletions

View File

@@ -0,0 +1,320 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
* Copyright (c) 2022 Jamie Mansfield <jmansfield@cadixdev.org>
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
* Copyright (C) 2024 TheKodeToad <TheKodeToad@proton.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* This file incorporates work covered by the following copyright and
* permission notice:
*
* Copyright 2013-2021 MultiMC Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "MinecraftSettingsWidget.h"
#include <Application.h>
#include "settings/Setting.h"
#include "ui_MinecraftSettingsWidget.h"
MinecraftSettingsWidget::MinecraftSettingsWidget(InstancePtr instance, QWidget* parent)
: QWidget(parent), m_instance(std::move(instance)), m_ui(new Ui::MinecraftSettingsWidget)
{
m_ui->setupUi(this);
if (m_instance == nullptr) {
// Java
m_ui->settingsTabs->removeTab(1);
// Launch
m_ui->settingsTabs->removeTab(2);
m_ui->openGlobalJavaSettingsButton->setVisible(false);
} else {
m_ui->showGameTime->setText(tr("Show time &playing this instance"));
m_ui->recordGameTime->setText(tr("&Record time playing this instance"));
m_ui->showGlobalGameTime->hide();
m_ui->showGameTimeWithoutDays->hide();
m_ui->maximizedWarning->setText(
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>"));
}
m_ui->maximizedWarning->hide();
connect(m_ui->maximizedCheckBox, &QCheckBox::toggled, this,
[this](const bool value) { m_ui->maximizedWarning->setVisible(value && (m_instance == nullptr || !m_instance->isLegacy())); });
loadSettings();
}
MinecraftSettingsWidget::~MinecraftSettingsWidget()
{
delete m_ui;
}
void MinecraftSettingsWidget::loadSettings()
{
const SettingsObjectPtr settings = getSettings();
// Miscellaneous
m_ui->miscellaneousSettingsBox->setCheckable(m_instance != nullptr);
m_ui->miscellaneousSettingsBox->setChecked(settings->get("OverrideMiscellaneous").toBool());
m_ui->closeAfterLaunchCheck->setChecked(settings->get("CloseAfterLaunch").toBool());
m_ui->quitAfterGameStopCheck->setChecked(settings->get("QuitAfterGameStop").toBool());
// Console
m_ui->consoleSettingsBox->setCheckable(m_instance != nullptr);
m_ui->consoleSettingsBox->setChecked(m_instance == nullptr || settings->get("OverrideConsole").toBool());
m_ui->showConsoleCheck->setChecked(settings->get("ShowConsole").toBool());
m_ui->autoCloseConsoleCheck->setChecked(settings->get("AutoCloseConsole").toBool());
m_ui->showConsoleErrorCheck->setChecked(settings->get("ShowConsoleOnError").toBool());
// Window Size
m_ui->windowSizeGroupBox->setCheckable(m_instance != nullptr);
m_ui->windowSizeGroupBox->setChecked(m_instance == nullptr || settings->get("OverrideWindow").toBool());
m_ui->windowSizeGroupBox->setChecked(settings->get("OverrideWindow").toBool());
m_ui->maximizedCheckBox->setChecked(settings->get("LaunchMaximized").toBool());
m_ui->windowWidthSpinBox->setValue(settings->get("MinecraftWinWidth").toInt());
m_ui->windowHeightSpinBox->setValue(settings->get("MinecraftWinHeight").toInt());
// Custom commands
m_ui->customCommands->initialize(m_instance != nullptr, m_instance == nullptr || settings->get("OverrideCommands").toBool(),
settings->get("PreLaunchCommand").toString(), settings->get("WrapperCommand").toString(),
settings->get("PostExitCommand").toString());
// Environment variables
m_ui->environmentVariables->initialize(m_instance != nullptr, m_instance == nullptr || settings->get("OverrideEnv").toBool(),
settings->get("Env").toMap());
// Workarounds
m_ui->nativeWorkaroundsGroupBox->setCheckable(m_instance != nullptr);
m_ui->nativeWorkaroundsGroupBox->setChecked(m_instance == nullptr || settings->get("OverrideNativeWorkarounds").toBool());
m_ui->useNativeGLFWCheck->setChecked(settings->get("UseNativeGLFW").toBool());
m_ui->lineEditGLFWPath->setText(settings->get("CustomGLFWPath").toString());
#ifdef Q_OS_LINUX
m_ui->lineEditGLFWPath->setPlaceholderText(APPLICATION->m_detectedGLFWPath);
#else
m_ui->lineEditGLFWPath->setPlaceholderText(tr("Path to %1 library file").arg(BuildConfig.GLFW_LIBRARY_NAME));
#endif
m_ui->useNativeOpenALCheck->setChecked(settings->get("UseNativeOpenAL").toBool());
m_ui->lineEditOpenALPath->setText(settings->get("CustomOpenALPath").toString());
#ifdef Q_OS_LINUX
m_ui->lineEditOpenALPath->setPlaceholderText(APPLICATION->m_detectedOpenALPath);
#else
m_ui->lineEditOpenALPath->setPlaceholderText(tr("Path to %1 library file").arg(BuildConfig.OPENAL_LIBRARY_NAME));
#endif
// Performance
m_ui->perfomanceGroupBox->setCheckable(m_instance != nullptr);
m_ui->perfomanceGroupBox->setChecked(m_instance == nullptr || settings->get("OverridePerformance").toBool());
m_ui->enableFeralGamemodeCheck->setChecked(settings->get("EnableFeralGamemode").toBool());
m_ui->enableMangoHud->setChecked(settings->get("EnableMangoHud").toBool());
m_ui->useDiscreteGpuCheck->setChecked(settings->get("UseDiscreteGpu").toBool());
m_ui->useZink->setChecked(settings->get("UseZink").toBool());
#if !defined(Q_OS_LINUX)
m_ui->settingsTabs->setTabVisible(ui->settingsTabs->indexOf(ui->performancePage), false);
#endif
if (!(APPLICATION->capabilities() & Application::SupportsGameMode)) {
m_ui->enableFeralGamemodeCheck->setDisabled(true);
m_ui->enableFeralGamemodeCheck->setToolTip(tr("Feral Interactive's GameMode could not be found on your system."));
}
if (!(APPLICATION->capabilities() & Application::SupportsMangoHud)) {
m_ui->enableMangoHud->setDisabled(true);
m_ui->enableMangoHud->setToolTip(tr("MangoHud could not be found on your system."));
}
// Miscellanous
m_ui->gameTimeGroupBox->setCheckable(m_instance != nullptr);
m_ui->gameTimeGroupBox->setChecked(m_instance == nullptr || settings->get("OverrideGameTime").toBool());
m_ui->showGameTime->setChecked(settings->get("ShowGameTime").toBool());
m_ui->recordGameTime->setChecked(settings->get("RecordGameTime").toBool());
m_ui->showGlobalGameTime->setChecked(m_instance != nullptr && settings->get("ShowGlobalGameTime").toBool());
m_ui->showGameTimeWithoutDays->setChecked(m_instance != nullptr && settings->get("ShowGameTimeWithoutDays").toBool());
m_ui->legacySettingsGroupBox->setCheckable(m_instance != nullptr);
m_ui->legacySettingsGroupBox->setChecked(m_instance == nullptr || settings->get("OverrideLegacySettings").toBool());
m_ui->onlineFixes->setChecked(settings->get("OnlineFixes").toBool());
}
void MinecraftSettingsWidget::saveSettings()
{
SettingsObjectPtr settings = getSettings();
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
bool console = m_instance == nullptr || m_ui->consoleSettingsBox->isChecked();
if (m_instance != nullptr)
settings->set("OverrideConsole", console);
if (console) {
settings->set("ShowConsole", m_ui->showConsoleCheck->isChecked());
settings->set("AutoCloseConsole", m_ui->autoCloseConsoleCheck->isChecked());
settings->set("ShowConsoleOnError", m_ui->showConsoleErrorCheck->isChecked());
} else {
settings->reset("ShowConsole");
settings->reset("AutoCloseConsole");
settings->reset("ShowConsoleOnError");
}
// Window Size
bool window = m_instance == nullptr || m_ui->windowSizeGroupBox->isChecked();
if (m_instance != nullptr)
settings->set("OverrideWindow", window);
if (window) {
settings->set("LaunchMaximized", m_ui->maximizedCheckBox->isChecked());
settings->set("MinecraftWinWidth", m_ui->windowWidthSpinBox->value());
settings->set("MinecraftWinHeight", m_ui->windowHeightSpinBox->value());
} else {
settings->reset("LaunchMaximized");
settings->reset("MinecraftWinWidth");
settings->reset("MinecraftWinHeight");
}
// Custom Commands
bool custcmd = m_instance == nullptr || m_ui->customCommands->checked();
if (m_instance != nullptr)
settings->set("OverrideCommands", custcmd);
if (custcmd) {
settings->set("PreLaunchCommand", m_ui->customCommands->prelaunchCommand());
settings->set("WrapperCommand", m_ui->customCommands->wrapperCommand());
settings->set("PostExitCommand", m_ui->customCommands->postexitCommand());
} else {
settings->reset("PreLaunchCommand");
settings->reset("WrapperCommand");
settings->reset("PostExitCommand");
}
// Environment Variables
auto env = m_instance == nullptr || m_ui->environmentVariables->override();
if (m_instance != nullptr)
settings->set("OverrideEnv", env);
if (env)
settings->set("Env", m_ui->environmentVariables->value());
else
settings->reset("Env");
// Workarounds
bool workarounds = m_instance == nullptr || m_ui->nativeWorkaroundsGroupBox->isChecked();
if (m_instance != nullptr)
settings->set("OverrideNativeWorkarounds", workarounds);
if (workarounds) {
settings->set("UseNativeGLFW", m_ui->useNativeGLFWCheck->isChecked());
settings->set("CustomGLFWPath", m_ui->lineEditGLFWPath->text());
settings->set("UseNativeOpenAL", m_ui->useNativeOpenALCheck->isChecked());
settings->set("CustomOpenALPath", m_ui->lineEditOpenALPath->text());
} else {
settings->reset("UseNativeGLFW");
settings->reset("CustomGLFWPath");
settings->reset("UseNativeOpenAL");
settings->reset("CustomOpenALPath");
}
// Performance
bool performance = m_instance == nullptr || m_ui->perfomanceGroupBox->isChecked();
if (m_instance != nullptr)
settings->set("OverridePerformance", performance);
if (performance) {
settings->set("EnableFeralGamemode", m_ui->enableFeralGamemodeCheck->isChecked());
settings->set("EnableMangoHud", m_ui->enableMangoHud->isChecked());
settings->set("UseDiscreteGpu", m_ui->useDiscreteGpuCheck->isChecked());
settings->set("UseZink", m_ui->useZink->isChecked());
} else {
settings->reset("EnableFeralGamemode");
settings->reset("EnableMangoHud");
settings->reset("UseDiscreteGpu");
settings->reset("UseZink");
}
// Game time
bool gameTime = m_instance == nullptr || m_ui->gameTimeGroupBox->isChecked();
if (m_instance != nullptr)
settings->set("OverrideGameTime", gameTime);
if (gameTime) {
settings->set("ShowGameTime", m_ui->showGameTime->isChecked());
settings->set("RecordGameTime", m_ui->recordGameTime->isChecked());
} else {
settings->reset("ShowGameTime");
settings->reset("RecordGameTime");
}
if (m_instance == nullptr) {
settings->set("ShowGlobalGameTime", m_ui->showGlobalGameTime->isChecked());
settings->set("ShowGameTimeWithoutDays", m_ui->showGameTimeWithoutDays->isChecked());
}
bool overrideLegacySettings = m_instance == nullptr || m_ui->legacySettingsGroupBox->isChecked();
if (m_instance != nullptr)
settings->set("OverrideLegacySettings", overrideLegacySettings);
if (overrideLegacySettings) {
settings->set("OnlineFixes", m_ui->onlineFixes->isChecked());
} else {
settings->reset("OnlineFixes");
}
if (m_instance != nullptr)
m_instance->updateRuntimeContext();
}
SettingsObjectPtr MinecraftSettingsWidget::getSettings() const
{
if (m_instance != nullptr)
return m_instance->settings();
return APPLICATION->settings();
}

View File

@@ -0,0 +1,59 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
* Prism Launcher - Minecraft Launcher
* Copyright (c) 2022 Jamie Mansfield <jmansfield@cadixdev.org>
* Copyright (C) 2024 TheKodeToad <TheKodeToad@proton.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* This file incorporates work covered by the following copyright and
* permission notice:
*
* Copyright 2013-2021 MultiMC Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <minecraft/MinecraftInstance.h>
#include <QWidget>
namespace Ui {
class MinecraftSettingsWidget;
}
class MinecraftSettingsWidget : public QWidget {
public:
MinecraftSettingsWidget(InstancePtr instance, QWidget* parent = nullptr);
~MinecraftSettingsWidget() override;
void loadSettings();
void saveSettings();
private:
SettingsObjectPtr getSettings() const;
InstancePtr m_instance;
Ui::MinecraftSettingsWidget* m_ui;
};

View File

@@ -0,0 +1,876 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MinecraftSettingsWidget</class>
<widget class="QWidget" name="MinecraftSettingsWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>648</width>
<height>400</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCommandLinkButton" name="openGlobalJavaSettingsButton">
<property name="text">
<string>Open &amp;Global Settings</string>
</property>
<property name="description">
<string>The settings here are overrides for global settings.</string>
</property>
</widget>
</item>
<item>
<widget class="QTabWidget" name="settingsTabs">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="generalPage">
<attribute name="title">
<string>General</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>-131</y>
<width>610</width>
<height>607</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QGroupBox" name="windowSizeGroupBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Game &amp;Window</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QCheckBox" name="maximizedCheckBox">
<property name="text">
<string>Start Minecraft maximized</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="maximizedWarning">
<property name="toolTip">
<string>The base game only supports resolution. In order to simulate the maximized behaviour the current implementation approximates the maximum display size.</string>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; color:#f5c211;&quot;&gt;Warning&lt;/span&gt;&lt;span style=&quot; color:#f5c211;&quot;&gt;: The maximized option may not be fully supported on all Minecraft versions.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayoutWindowSize">
<item row="1" column="0">
<widget class="QLabel" name="labelWindowHeight">
<property name="text">
<string>Window height:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="labelWindowWidth">
<property name="text">
<string>Window width:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="windowWidthSpinBox">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>65536</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>854</number>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="windowHeightSpinBox">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>65536</number>
</property>
<property name="value">
<number>480</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gameTimeGroupBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Game &amp;Time</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<widget class="QCheckBox" name="showGameTime">
<property name="text">
<string>Show time spent &amp;playing instances</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="recordGameTime">
<property name="text">
<string>&amp;Record time spent playing instances</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="showGlobalGameTime">
<property name="text">
<string>Show &amp;total of time played across instances</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="showGameTimeWithoutDays">
<property name="text">
<string>Always show durations in &amp;hours</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="consoleSettingsBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>&amp;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>&amp;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>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="javaPage">
<attribute name="title">
<string>Java</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<widget class="QScrollArea" name="scrollArea_4">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_6">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>610</width>
<height>454</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_18">
<item>
<widget class="QGroupBox" name="javaSettingsGroupBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Java Insta&amp;llation</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="4" column="0">
<widget class="QCheckBox" name="skipCompatibilityCheckbox">
<property name="toolTip">
<string>If enabled, the launcher will not check if an instance is compatible with the selected Java version.</string>
</property>
<property name="text">
<string>Skip Java compatibility checks</string>
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLineEdit" name="javaPathTextBox"/>
</item>
<item>
<widget class="QPushButton" name="javaBrowseBtn">
<property name="text">
<string>Browse</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QPushButton" name="javaDownloadBtn">
<property name="text">
<string>Download Java</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="javaDetectBtn">
<property name="text">
<string>Auto-detect...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="javaTestBtn">
<property name="text">
<string>Test</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="memoryGroupBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Memor&amp;y</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_5" columnstretch="1,0,0,0">
<item row="2" column="0">
<widget class="QLabel" name="labelPermGen">
<property name="text">
<string>PermGen:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="labelMinMem">
<property name="text">
<string>Minimum memory allocation:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelMaxMem">
<property name="text">
<string>Maximum memory allocation:</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<widget class="QLabel" name="labelPermgenNote">
<property name="text">
<string>Note: Permgen is set automatically by Java 8 and later</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QSpinBox" name="minMemSpinBox">
<property name="toolTip">
<string>The amount of memory Minecraft is started with.</string>
</property>
<property name="suffix">
<string notr="true"> MiB</string>
</property>
<property name="minimum">
<number>8</number>
</property>
<property name="maximum">
<number>1048576</number>
</property>
<property name="singleStep">
<number>128</number>
</property>
<property name="value">
<number>256</number>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QSpinBox" name="maxMemSpinBox">
<property name="toolTip">
<string>The maximum amount of memory Minecraft is allowed to use.</string>
</property>
<property name="suffix">
<string notr="true"> MiB</string>
</property>
<property name="minimum">
<number>8</number>
</property>
<property name="maximum">
<number>1048576</number>
</property>
<property name="singleStep">
<number>128</number>
</property>
<property name="value">
<number>1024</number>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QSpinBox" name="permGenSpinBox">
<property name="toolTip">
<string>The amount of memory available to store loaded Java classes.</string>
</property>
<property name="suffix">
<string notr="true"> MiB</string>
</property>
<property name="minimum">
<number>4</number>
</property>
<property name="maximum">
<number>999999999</number>
</property>
<property name="singleStep">
<number>8</number>
</property>
<property name="value">
<number>64</number>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="labelMaxMemIcon">
<property name="text">
<string notr="true"/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="buddy">
<cstring>maxMemSpinBox</cstring>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="javaArgumentsGroupBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Java Argumen&amp;ts</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="1" column="1">
<widget class="QPlainTextEdit" name="jvmArgsTextBox"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tweaksPage">
<attribute name="title">
<string>Tweaks</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QScrollArea" name="scrollArea_2">
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_2">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>610</width>
<height>439</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QGroupBox" name="legacySettingsGroupBox">
<property name="title">
<string>&amp;Legacy Tweaks</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_17">
<item>
<widget class="QCheckBox" name="onlineFixes">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Emulates usages of old online services which are no longer operating.&lt;/p&gt;&lt;p&gt;Current fixes include: skin and online mode support.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Enable online fixes (experimental)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="nativeWorkaroundsGroupBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>&amp;Native Libraries</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="0">
<widget class="QCheckBox" name="useNativeOpenALCheck">
<property name="text">
<string>Use system installation of OpenAL</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelGLFWPath">
<property name="text">
<string>&amp;GLFW library path</string>
</property>
<property name="buddy">
<cstring>lineEditGLFWPath</cstring>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="useNativeGLFWCheck">
<property name="text">
<string>Use system installation of GLFW</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEditGLFWPath">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelOpenALPath">
<property name="text">
<string>&amp;OpenAL library path</string>
</property>
<property name="buddy">
<cstring>lineEditOpenALPath</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineEditOpenALPath">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="perfomanceGroupBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>&amp;Performance</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_13">
<item>
<widget class="QCheckBox" name="enableFeralGamemodeCheck">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable Feral Interactive's GameMode, to potentially improve gaming performance.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Enable Feral GameMode</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="enableMangoHud">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable MangoHud's advanced performance overlay.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Enable MangoHud</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="useDiscreteGpuCheck">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Use the discrete GPU instead of the primary GPU.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Use discrete GPU</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="useZink">
<property name="toolTip">
<string>Use Zink, a Mesa OpenGL driver that implements OpenGL on top of Vulkan. Performance may vary depending on the situation. Note: If no suitable Vulkan driver is found, software rendering will be used.</string>
</property>
<property name="text">
<string>Use Zink</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="launchPage">
<attribute name="title">
<string>Launch</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QScrollArea" name="scrollArea_3">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_5">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>624</width>
<height>291</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_14">
<item>
<widget class="QGroupBox" name="instanceAccountGroupBox">
<property name="title">
<string>Override default &amp;account</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_15">
<item>
<layout class="QGridLayout" name="instanceAccountLayout">
<item row="0" column="0">
<widget class="QLabel" name="instanceAccountNameLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Account:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="instanceAccountSelector"/>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="serverJoinGroupBox">
<property name="title">
<string>Set a &amp;target to join on launch</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QRadioButton" name="serverJoinAddressButton">
<property name="text">
<string>Server address:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLineEdit" name="serverJoinAddress"/>
</item>
<item row="1" column="0">
<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"/>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="customCommandsPage">
<attribute name="title">
<string>Custom Commands</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="CustomCommands" name="customCommands" native="true"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="environmentVariablesPage">
<attribute name="title">
<string>Environment Variables</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_16">
<item>
<widget class="EnvironmentVariables" name="environmentVariables" native="true"/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>CustomCommands</class>
<extends>QWidget</extends>
<header>ui/widgets/CustomCommands.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>EnvironmentVariables</class>
<extends>QWidget</extends>
<header>ui/widgets/EnvironmentVariables.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>maximizedCheckBox</tabstop>
<tabstop>windowWidthSpinBox</tabstop>
<tabstop>windowHeightSpinBox</tabstop>
<tabstop>showConsoleCheck</tabstop>
<tabstop>autoCloseConsoleCheck</tabstop>
<tabstop>showConsoleErrorCheck</tabstop>
<tabstop>useNativeGLFWCheck</tabstop>
<tabstop>useNativeOpenALCheck</tabstop>
<tabstop>closeAfterLaunchCheck</tabstop>
<tabstop>quitAfterGameStopCheck</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>