mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into shader
This commit is contained in:
@ -291,12 +291,12 @@ void ExternalResourcesPage::disableItem()
|
||||
|
||||
void ExternalResourcesPage::viewConfigs()
|
||||
{
|
||||
DesktopServices::openDirectory(m_instance->instanceConfigFolder(), true);
|
||||
DesktopServices::openPath(m_instance->instanceConfigFolder(), true);
|
||||
}
|
||||
|
||||
void ExternalResourcesPage::viewFolder()
|
||||
{
|
||||
DesktopServices::openDirectory(m_model->dir().absolutePath(), true);
|
||||
DesktopServices::openPath(m_model->dir().absolutePath(), true);
|
||||
}
|
||||
|
||||
bool ExternalResourcesPage::current(const QModelIndex& current, const QModelIndex& previous)
|
||||
|
@ -232,10 +232,13 @@ void InstanceSettingsPage::applySettings()
|
||||
m_settings->set("EnableFeralGamemode", ui->enableFeralGamemodeCheck->isChecked());
|
||||
m_settings->set("EnableMangoHud", ui->enableMangoHud->isChecked());
|
||||
m_settings->set("UseDiscreteGpu", ui->useDiscreteGpuCheck->isChecked());
|
||||
m_settings->set("UseZink", ui->useZink->isChecked());
|
||||
|
||||
} else {
|
||||
m_settings->reset("EnableFeralGamemode");
|
||||
m_settings->reset("EnableMangoHud");
|
||||
m_settings->reset("UseDiscreteGpu");
|
||||
m_settings->reset("UseZink");
|
||||
}
|
||||
|
||||
// Game time
|
||||
@ -346,7 +349,7 @@ void InstanceSettingsPage::loadSettings()
|
||||
#ifdef Q_OS_LINUX
|
||||
ui->lineEditOpenALPath->setPlaceholderText(APPLICATION->m_detectedOpenALPath);
|
||||
#else
|
||||
ui->lineEditGLFWPath->setPlaceholderText(tr("Path to %1 library file").arg(BuildConfig.OPENAL_LIBRARY_NAME));
|
||||
ui->lineEditOpenALPath->setPlaceholderText(tr("Path to %1 library file").arg(BuildConfig.OPENAL_LIBRARY_NAME));
|
||||
#endif
|
||||
|
||||
// Performance
|
||||
@ -354,6 +357,7 @@ void InstanceSettingsPage::loadSettings()
|
||||
ui->enableFeralGamemodeCheck->setChecked(m_settings->get("EnableFeralGamemode").toBool());
|
||||
ui->enableMangoHud->setChecked(m_settings->get("EnableMangoHud").toBool());
|
||||
ui->useDiscreteGpuCheck->setChecked(m_settings->get("UseDiscreteGpu").toBool());
|
||||
ui->useZink->setChecked(m_settings->get("UseZink").toBool());
|
||||
|
||||
#if !defined(Q_OS_LINUX)
|
||||
ui->settingsTabs->setTabVisible(ui->settingsTabs->indexOf(ui->performancePage), false);
|
||||
|
@ -567,6 +567,16 @@
|
||||
</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>
|
||||
@ -605,7 +615,7 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="onlineFixes">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Emulates usages of old online services which are no longer operating.</p><p>This currently allows modern skins to be used.</p></body></html></string>
|
||||
<string><html><head/><body><p>Emulates usages of old online services which are no longer operating.</p><p>Current fixes include: skin and online mode support.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable online fixes (experimental)</string>
|
||||
|
@ -131,6 +131,22 @@ ManagedPackPage::~ManagedPackPage()
|
||||
|
||||
void ManagedPackPage::openedImpl()
|
||||
{
|
||||
if (m_inst->getManagedPackID().isEmpty()) {
|
||||
ui->packVersion->hide();
|
||||
ui->packVersionLabel->hide();
|
||||
ui->packOrigin->hide();
|
||||
ui->packOriginLabel->hide();
|
||||
ui->versionsComboBox->hide();
|
||||
ui->updateButton->hide();
|
||||
ui->updateToVersionLabel->hide();
|
||||
ui->updateFromFileButton->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
|
||||
ui->packName->setText(m_inst->name());
|
||||
ui->changelogTextBrowser->setText(tr("This is a local modpack.\n"
|
||||
"This can be updated only using a file in %1 format\n")
|
||||
.arg(displayName()));
|
||||
return;
|
||||
}
|
||||
ui->packName->setText(m_inst->getManagedPackName());
|
||||
ui->packVersion->setText(m_inst->getManagedPackVersionName());
|
||||
ui->packOrigin->setText(tr("Website: <a href=%1>%2</a> | Pack ID: %3 | Version ID: %4")
|
||||
@ -355,6 +371,8 @@ void ModrinthManagedPackPage::update()
|
||||
void ModrinthManagedPackPage::updateFromFile()
|
||||
{
|
||||
auto output = QFileDialog::getOpenFileUrl(this, tr("Choose update file"), QDir::homePath(), "Modrinth pack (*.mrpack *.zip)");
|
||||
if (output.isEmpty())
|
||||
return;
|
||||
QMap<QString, QString> extra_info;
|
||||
extra_info.insert("pack_id", m_inst->getManagedPackID());
|
||||
extra_info.insert("pack_version_id", QString());
|
||||
@ -472,7 +490,7 @@ void FlameManagedPackPage::parseManagedPack()
|
||||
QString FlameManagedPackPage::url() const
|
||||
{
|
||||
// FIXME: We should display the websiteUrl field, but this requires doing the API request first :(
|
||||
return {};
|
||||
return "https://www.curseforge.com/projects/" + m_inst->getManagedPackID();
|
||||
}
|
||||
|
||||
void FlameManagedPackPage::suggestVersion()
|
||||
@ -519,6 +537,8 @@ void FlameManagedPackPage::update()
|
||||
void FlameManagedPackPage::updateFromFile()
|
||||
{
|
||||
auto output = QFileDialog::getOpenFileUrl(this, tr("Choose update file"), QDir::homePath(), "CurseForge pack (*.zip)");
|
||||
if (output.isEmpty())
|
||||
return;
|
||||
|
||||
QMap<QString, QString> extra_info;
|
||||
extra_info.insert("pack_id", m_inst->getManagedPackID());
|
||||
|
@ -242,7 +242,7 @@ void ModFolderPage::updateMods(bool includeDeps)
|
||||
if (m_instance != nullptr && m_instance->isRunning()) {
|
||||
auto response =
|
||||
CustomMessageBox::selectable(this, tr("Confirm Update"),
|
||||
tr("If you update mods while the game is running may cause mod duplication and game crashes.\n"
|
||||
tr("Updating mods while the game is running may cause mod duplication and game crashes.\n"
|
||||
"The old files may not be deleted as they are in use.\n"
|
||||
"Are you sure you want to do this?"),
|
||||
QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No)
|
||||
|
@ -324,8 +324,7 @@ void ScreenshotsPage::onItemActivated(QModelIndex index)
|
||||
if (!index.isValid())
|
||||
return;
|
||||
auto info = m_model->fileInfo(index);
|
||||
QString fileName = info.absoluteFilePath();
|
||||
DesktopServices::openFile(info.absoluteFilePath());
|
||||
DesktopServices::openPath(info);
|
||||
}
|
||||
|
||||
void ScreenshotsPage::onCurrentSelectionChanged(const QItemSelection& selected)
|
||||
@ -352,7 +351,7 @@ void ScreenshotsPage::onCurrentSelectionChanged(const QItemSelection& selected)
|
||||
|
||||
void ScreenshotsPage::on_actionView_Folder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(m_folder, true);
|
||||
DesktopServices::openPath(m_folder, true);
|
||||
}
|
||||
|
||||
void ScreenshotsPage::on_actionUpload_triggered()
|
||||
|
@ -295,13 +295,6 @@ void VersionPage::on_actionRemove_triggered()
|
||||
m_container->refreshContainer();
|
||||
}
|
||||
|
||||
void VersionPage::on_actionInstall_mods_triggered()
|
||||
{
|
||||
if (m_container) {
|
||||
m_container->selectPage("mods");
|
||||
}
|
||||
}
|
||||
|
||||
void VersionPage::on_actionAdd_to_Minecraft_jar_triggered()
|
||||
{
|
||||
auto list = GuiUtil::BrowseForFiles("jarmod", tr("Select jar mods"), tr("Minecraft.jar mods (*.zip *.jar)"),
|
||||
@ -454,12 +447,12 @@ void VersionPage::on_actionAdd_Empty_triggered()
|
||||
|
||||
void VersionPage::on_actionLibrariesFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(m_inst->getLocalLibraryPath(), true);
|
||||
DesktopServices::openPath(m_inst->getLocalLibraryPath(), true);
|
||||
}
|
||||
|
||||
void VersionPage::on_actionMinecraftFolder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(m_inst->gameRoot(), true);
|
||||
DesktopServices::openPath(m_inst->gameRoot(), true);
|
||||
}
|
||||
|
||||
void VersionPage::versionCurrent(const QModelIndex& current, [[maybe_unused]] const QModelIndex& previous)
|
||||
|
@ -80,7 +80,6 @@ class VersionPage : public QMainWindow, public BasePage {
|
||||
void on_actionAdd_Agents_triggered();
|
||||
void on_actionRevert_triggered();
|
||||
void on_actionEdit_triggered();
|
||||
void on_actionInstall_mods_triggered();
|
||||
void on_actionCustomize_triggered();
|
||||
void on_actionDownload_All_triggered();
|
||||
|
||||
|
@ -207,7 +207,7 @@ void WorldListPage::on_actionRemove_triggered()
|
||||
|
||||
void WorldListPage::on_actionView_Folder_triggered()
|
||||
{
|
||||
DesktopServices::openDirectory(m_worlds->dir().absolutePath(), true);
|
||||
DesktopServices::openPath(m_worlds->dir().absolutePath(), true);
|
||||
}
|
||||
|
||||
void WorldListPage::on_actionDatapacks_triggered()
|
||||
@ -223,7 +223,7 @@ void WorldListPage::on_actionDatapacks_triggered()
|
||||
|
||||
auto fullPath = m_worlds->data(index, WorldList::FolderRole).toString();
|
||||
|
||||
DesktopServices::openDirectory(FS::PathCombine(fullPath, "datapacks"), true);
|
||||
DesktopServices::openPath(FS::PathCombine(fullPath, "datapacks"), true);
|
||||
}
|
||||
|
||||
void WorldListPage::on_actionReset_Icon_triggered()
|
||||
|
Reference in New Issue
Block a user