From 8406c7f431009d7e81b0b0e9e1daddcaf82d8324 Mon Sep 17 00:00:00 2001 From: Kenneth Chew Date: Mon, 4 Apr 2022 19:30:27 -0400 Subject: Add option to install mod loader during instance creation --- launcher/ui/pages/modplatform/VanillaPage.ui | 297 ++++++++++++++++++--------- 1 file changed, 204 insertions(+), 93 deletions(-) (limited to 'launcher/ui/pages/modplatform/VanillaPage.ui') diff --git a/launcher/ui/pages/modplatform/VanillaPage.ui b/launcher/ui/pages/modplatform/VanillaPage.ui index 870ff161..97724ea8 100644 --- a/launcher/ui/pages/modplatform/VanillaPage.ui +++ b/launcher/ui/pages/modplatform/VanillaPage.ui @@ -33,113 +33,221 @@ - - - - - - Filter - - - Qt::AlignCenter - - - - - - - Releases - - - true - - - true - - - - - - - Snapshots - - - true - - - - - - - Old Snapshots - - - true - - - + + + + + 0 + 0 + + + + Qt::Horizontal + + + + + - - - Betas - - - true + + + + 0 + 0 + - - - Alphas - - - true - - + + + + + Filter + + + Qt::AlignCenter + + + + + + + Releases + + + true + + + true + + + + + + + Snapshots + + + true + + + + + + + Old Snapshots + + + true + + + + + + + Betas + + + true + + + + + + + Alphas + + + true + + + + + + + Experiments + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Refresh + + + + + + + + - - - Experiments - - - true + + + + 0 + 0 + - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Refresh - - + + + + + Mod Loader + + + Qt::AlignCenter + + + + + + + None + + + true + + + loaderBtnGroup + + + + + + + Forge + + + loaderBtnGroup + + + + + + + Fabric + + + loaderBtnGroup + + + + + + + LiteLoader + + + loaderBtnGroup + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Refresh + + + + - - - - - 0 - 0 - - - - @@ -166,4 +274,7 @@ + + + -- cgit From 3e64935844f5ad1e772eab763a7f02260c25dcc1 Mon Sep 17 00:00:00 2001 From: Kenneth Chew Date: Fri, 15 Apr 2022 15:04:49 -0400 Subject: Add Quilt install option while creating an instance --- launcher/ui/pages/modplatform/VanillaPage.cpp | 14 ++++++++++++-- launcher/ui/pages/modplatform/VanillaPage.ui | 10 ++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'launcher/ui/pages/modplatform/VanillaPage.ui') diff --git a/launcher/ui/pages/modplatform/VanillaPage.cpp b/launcher/ui/pages/modplatform/VanillaPage.cpp index 74c1bed4..207d0130 100644 --- a/launcher/ui/pages/modplatform/VanillaPage.cpp +++ b/launcher/ui/pages/modplatform/VanillaPage.cpp @@ -65,6 +65,7 @@ VanillaPage::VanillaPage(NewInstanceDialog *dialog, QWidget *parent) connect(ui->noneFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged); connect(ui->forgeFilter, &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->loaderRefreshBtn, &QPushButton::clicked, this, &VanillaPage::loaderRefresh); @@ -133,12 +134,21 @@ void VanillaPage::loaderFilterChanged() else if(ui->fabricFilter->isChecked()) { // 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, ""); - else // Fabric unsupported + else // Fabric/Quilt unsupported ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, "AAA"); // clear list 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()) { ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, minecraftVersion); diff --git a/launcher/ui/pages/modplatform/VanillaPage.ui b/launcher/ui/pages/modplatform/VanillaPage.ui index 97724ea8..43110927 100644 --- a/launcher/ui/pages/modplatform/VanillaPage.ui +++ b/launcher/ui/pages/modplatform/VanillaPage.ui @@ -214,6 +214,16 @@ + + + + Quilt + + + loaderBtnGroup + + + -- cgit