Add Quilt install option while creating an instance
This commit is contained in:
parent
7577115c3c
commit
3e64935844
@ -65,6 +65,7 @@ VanillaPage::VanillaPage(NewInstanceDialog *dialog, QWidget *parent)
|
|||||||
connect(ui->noneFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
connect(ui->noneFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
||||||
connect(ui->forgeFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
connect(ui->forgeFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
||||||
connect(ui->fabricFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
connect(ui->fabricFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
||||||
|
connect(ui->quiltFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
||||||
connect(ui->liteLoaderFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
connect(ui->liteLoaderFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
||||||
connect(ui->loaderRefreshBtn, &QPushButton::clicked, this, &VanillaPage::loaderRefresh);
|
connect(ui->loaderRefreshBtn, &QPushButton::clicked, this, &VanillaPage::loaderRefresh);
|
||||||
|
|
||||||
@ -133,12 +134,21 @@ void VanillaPage::loaderFilterChanged()
|
|||||||
else if(ui->fabricFilter->isChecked())
|
else if(ui->fabricFilter->isChecked())
|
||||||
{
|
{
|
||||||
// FIXME: dirty hack because the launcher is unaware of Fabric's dependencies
|
// FIXME: dirty hack because the launcher is unaware of Fabric's dependencies
|
||||||
if (Version(minecraftVersion) >= Version("1.14")) // Fabric supported
|
if (Version(minecraftVersion) >= Version("1.14")) // Fabric/Quilt supported
|
||||||
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, "");
|
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, "");
|
||||||
else // Fabric unsupported
|
else // Fabric/Quilt unsupported
|
||||||
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, "AAA"); // clear list
|
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, "AAA"); // clear list
|
||||||
m_selectedLoader = "net.fabricmc.fabric-loader";
|
m_selectedLoader = "net.fabricmc.fabric-loader";
|
||||||
}
|
}
|
||||||
|
else if(ui->quiltFilter->isChecked())
|
||||||
|
{
|
||||||
|
// FIXME: dirty hack because the launcher is unaware of Quilt's dependencies (same as Fabric)
|
||||||
|
if (Version(minecraftVersion) >= Version("1.14")) // Fabric/Quilt supported
|
||||||
|
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, "");
|
||||||
|
else // Fabric/Quilt unsupported
|
||||||
|
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, "AAA"); // clear list
|
||||||
|
m_selectedLoader = "org.quiltmc.quilt-loader";
|
||||||
|
}
|
||||||
else if(ui->liteLoaderFilter->isChecked())
|
else if(ui->liteLoaderFilter->isChecked())
|
||||||
{
|
{
|
||||||
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, minecraftVersion);
|
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, minecraftVersion);
|
||||||
|
@ -214,6 +214,16 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="quiltFilter">
|
||||||
|
<property name="text">
|
||||||
|
<string>Quilt</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">loaderBtnGroup</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="liteLoaderFilter">
|
<widget class="QRadioButton" name="liteLoaderFilter">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
Loading…
Reference in New Issue
Block a user