mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-29 13:20:18 +02:00
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into refresh_cats
This commit is contained in:
commit
a0ebd0714d
18
flake.lock
generated
18
flake.lock
generated
@ -21,11 +21,11 @@
|
|||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701473968,
|
"lastModified": 1704152458,
|
||||||
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
|
"narHash": "sha256-DS+dGw7SKygIWf9w4eNBUZsK+4Ug27NwEWmn2tnbycg=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
|
"rev": "88a2cd8166694ba0b6cb374700799cec53aef527",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -106,11 +106,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703499205,
|
"lastModified": 1704161960,
|
||||||
"narHash": "sha256-lF9rK5mSUfIZJgZxC3ge40tp1gmyyOXZ+lRY3P8bfbg=",
|
"narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e1fa12d4f6c6fe19ccb59cac54b5b3f25e160870",
|
"rev": "63143ac2c9186be6d9da6035fa22620018c85932",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -123,11 +123,11 @@
|
|||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "lib",
|
"dir": "lib",
|
||||||
"lastModified": 1701253981,
|
"lastModified": 1703961334,
|
||||||
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
|
"narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
|
"rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -666,6 +666,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
|
|||||||
|
|
||||||
// The cat
|
// The cat
|
||||||
m_settings->registerSetting("TheCat", false);
|
m_settings->registerSetting("TheCat", false);
|
||||||
|
m_settings->registerSetting("CatOpacity", 100);
|
||||||
|
|
||||||
m_settings->registerSetting("StatusBarVisible", true);
|
m_settings->registerSetting("StatusBarVisible", true);
|
||||||
|
|
||||||
|
@ -157,20 +157,6 @@ void MojangVersionFormat::readVersionProperties(const QJsonObject& in, VersionFi
|
|||||||
Bits::readString(in, "id", out->minecraftVersion);
|
Bits::readString(in, "id", out->minecraftVersion);
|
||||||
Bits::readString(in, "mainClass", out->mainClass);
|
Bits::readString(in, "mainClass", out->mainClass);
|
||||||
Bits::readString(in, "minecraftArguments", out->minecraftArguments);
|
Bits::readString(in, "minecraftArguments", out->minecraftArguments);
|
||||||
if (out->minecraftArguments.isEmpty()) {
|
|
||||||
QString processArguments;
|
|
||||||
Bits::readString(in, "processArguments", processArguments);
|
|
||||||
QString toCompare = processArguments.toLower();
|
|
||||||
if (toCompare == "legacy") {
|
|
||||||
out->minecraftArguments = " ${auth_player_name} ${auth_session}";
|
|
||||||
} else if (toCompare == "username_session") {
|
|
||||||
out->minecraftArguments = "--username ${auth_player_name} --session ${auth_session}";
|
|
||||||
} else if (toCompare == "username_session_version") {
|
|
||||||
out->minecraftArguments = "--username ${auth_player_name} --session ${auth_session} --version ${profile_name}";
|
|
||||||
} else if (!toCompare.isEmpty()) {
|
|
||||||
out->addProblem(ProblemSeverity::Error, QObject::tr("processArguments is set to unknown value '%1'").arg(processArguments));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Bits::readString(in, "type", out->type);
|
Bits::readString(in, "type", out->type);
|
||||||
|
|
||||||
Bits::readString(in, "assets", out->assets);
|
Bits::readString(in, "assets", out->assets);
|
||||||
|
@ -458,6 +458,7 @@ void InstanceView::paintEvent([[maybe_unused]] QPaintEvent* event)
|
|||||||
QPainter painter(this->viewport());
|
QPainter painter(this->viewport());
|
||||||
|
|
||||||
if (m_catVisible) {
|
if (m_catVisible) {
|
||||||
|
painter.setOpacity(APPLICATION->settings()->get("CatOpacity").toFloat() / 100);
|
||||||
int widWidth = this->viewport()->width();
|
int widWidth = this->viewport()->width();
|
||||||
int widHeight = this->viewport()->height();
|
int widHeight = this->viewport()->height();
|
||||||
if (m_catPixmap.width() < widWidth)
|
if (m_catPixmap.width() < widWidth)
|
||||||
@ -468,6 +469,7 @@ void InstanceView::paintEvent([[maybe_unused]] QPaintEvent* event)
|
|||||||
QRect rectOfPixmap = pixmap.rect();
|
QRect rectOfPixmap = pixmap.rect();
|
||||||
rectOfPixmap.moveBottomRight(this->viewport()->rect().bottomRight());
|
rectOfPixmap.moveBottomRight(this->viewport()->rect().bottomRight());
|
||||||
painter.drawPixmap(rectOfPixmap.topLeft(), pixmap);
|
painter.drawPixmap(rectOfPixmap.topLeft(), pixmap);
|
||||||
|
painter.setOpacity(1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
@ -221,6 +221,9 @@ void LauncherPage::applySettings()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cat
|
||||||
|
s->set("CatOpacity", ui->catOpacitySpinBox->value());
|
||||||
|
|
||||||
// Mods
|
// Mods
|
||||||
s->set("ModMetadataDisabled", ui->metadataDisableBtn->isChecked());
|
s->set("ModMetadataDisabled", ui->metadataDisableBtn->isChecked());
|
||||||
s->set("ModDependenciesDisabled", ui->dependenciesDisableBtn->isChecked());
|
s->set("ModDependenciesDisabled", ui->dependenciesDisableBtn->isChecked());
|
||||||
@ -276,6 +279,9 @@ void LauncherPage::loadSettings()
|
|||||||
ui->sortByNameBtn->setChecked(true);
|
ui->sortByNameBtn->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cat
|
||||||
|
ui->catOpacitySpinBox->setValue(s->get("CatOpacity").toInt());
|
||||||
|
|
||||||
// Mods
|
// Mods
|
||||||
ui->metadataDisableBtn->setChecked(s->get("ModMetadataDisabled").toBool());
|
ui->metadataDisableBtn->setChecked(s->get("ModMetadataDisabled").toBool());
|
||||||
ui->metadataWarningLabel->setHidden(!ui->metadataDisableBtn->isChecked());
|
ui->metadataWarningLabel->setHidden(!ui->metadataDisableBtn->isChecked());
|
||||||
|
@ -186,7 +186,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="dependenciesDisableBtn">
|
<widget class="QCheckBox" name="dependenciesDisableBtn">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Disable the automatic detection, installation, and updating of mod dependencies.</string>
|
<string>Disable the automatic detection, installation, and updating of mod dependencies.</string>
|
||||||
@ -300,6 +300,54 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="catBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Cat</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="catOpacityLabel">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Set the cat's opacity. 0% is fully transparent and 100% is fully opaque.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Opacity</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QSpinBox" name="catOpacitySpinBox">
|
||||||
|
<property name="specialValueText">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string>%</string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="toolsBox">
|
<widget class="QGroupBox" name="toolsBox">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -346,7 +346,7 @@ void InstanceSettingsPage::loadSettings()
|
|||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
ui->lineEditOpenALPath->setPlaceholderText(APPLICATION->m_detectedOpenALPath);
|
ui->lineEditOpenALPath->setPlaceholderText(APPLICATION->m_detectedOpenALPath);
|
||||||
#else
|
#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
|
#endif
|
||||||
|
|
||||||
// Performance
|
// Performance
|
||||||
|
@ -35,14 +35,14 @@
|
|||||||
|
|
||||||
package org.prismlauncher.legacy.fix.online;
|
package org.prismlauncher.legacy.fix.online;
|
||||||
|
|
||||||
|
import org.prismlauncher.legacy.utils.url.UrlUtils;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.Proxy;
|
import java.net.Proxy;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
|
|
||||||
import org.prismlauncher.legacy.utils.url.UrlUtils;
|
|
||||||
|
|
||||||
public final class OnlineModeFix {
|
public final class OnlineModeFix {
|
||||||
public static URLConnection openConnection(URL address, Proxy proxy) throws IOException {
|
public static URLConnection openConnection(URL address, Proxy proxy) throws IOException {
|
||||||
// we start with "http://www.minecraft.net/game/joinserver.jsp?user=..."
|
// we start with "http://www.minecraft.net/game/joinserver.jsp?user=..."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user