Add "Babric" and "Babric (BTA)" as shown on Modrinth. Add "Show More" button to allow for space efficiency and readiness to add all other Modrinth modloader types.
Signed-off-by: matthewperiut <matthewperiut@gmail.com>
This commit is contained in:
parent
af73cfa20f
commit
20a833e1b9
8 changed files with 85 additions and 10 deletions
|
@ -149,10 +149,16 @@ ModFilterWidget::ModFilterWidget(MinecraftInstance* instance, bool extended)
|
|||
connect(ui->forge, &QCheckBox::stateChanged, this, &ModFilterWidget::onLoadersFilterChanged);
|
||||
connect(ui->fabric, &QCheckBox::stateChanged, this, &ModFilterWidget::onLoadersFilterChanged);
|
||||
connect(ui->quilt, &QCheckBox::stateChanged, this, &ModFilterWidget::onLoadersFilterChanged);
|
||||
if (extended)
|
||||
connect(ui->liteLoader, &QCheckBox::stateChanged, this, &ModFilterWidget::onLoadersFilterChanged);
|
||||
else
|
||||
ui->liteLoader->setVisible(false);
|
||||
connect(ui->liteLoader, &QCheckBox::stateChanged, this, &ModFilterWidget::onLoadersFilterChanged);
|
||||
connect(ui->babric, &QCheckBox::stateChanged, this, &ModFilterWidget::onLoadersFilterChanged);
|
||||
connect(ui->btaBabric, &QCheckBox::stateChanged, this, &ModFilterWidget::onLoadersFilterChanged);
|
||||
|
||||
connect(ui->showMoreButton, &QPushButton::clicked, this, &ModFilterWidget::onShowMoreClicked);
|
||||
|
||||
if (!extended) {
|
||||
ui->showMoreButton->setVisible(false);
|
||||
ui->extendedModLoadersWidget->setVisible(false);
|
||||
}
|
||||
|
||||
if (extended) {
|
||||
connect(ui->clientSide, &QCheckBox::stateChanged, this, &ModFilterWidget::onSideFilterChanged);
|
||||
|
@ -279,6 +285,10 @@ void ModFilterWidget::onLoadersFilterChanged()
|
|||
loaders |= ModPlatform::Quilt;
|
||||
if (ui->liteLoader->isChecked())
|
||||
loaders |= ModPlatform::LiteLoader;
|
||||
if (ui->babric->isChecked())
|
||||
loaders |= ModPlatform::Babric;
|
||||
if (ui->btaBabric->isChecked())
|
||||
loaders |= ModPlatform::BTA;
|
||||
m_filter_changed = loaders != m_filter->loaders;
|
||||
m_filter->loaders = loaders;
|
||||
if (m_filter_changed)
|
||||
|
@ -381,4 +391,10 @@ void ModFilterWidget::onReleaseFilterChanged()
|
|||
emit filterChanged();
|
||||
}
|
||||
|
||||
void ModFilterWidget::onShowMoreClicked()
|
||||
{
|
||||
ui->extendedModLoadersWidget->setVisible(true);
|
||||
ui->showMoreButton->setVisible(false);
|
||||
}
|
||||
|
||||
#include "ModFilterWidget.moc"
|
||||
|
|
|
@ -110,6 +110,7 @@ class ModFilterWidget : public QTabWidget {
|
|||
void onShowAllVersionsChanged();
|
||||
void onOpenSourceFilterChanged();
|
||||
void onReleaseFilterChanged();
|
||||
void onShowMoreClicked();
|
||||
|
||||
private:
|
||||
Ui::ModFilterWidget* ui;
|
||||
|
|
|
@ -122,12 +122,54 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="liteLoader">
|
||||
<widget class="QPushButton" name="showMoreButton">
|
||||
<property name="text">
|
||||
<string>LiteLoader</string>
|
||||
<string>Show More</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="extendedModLoadersWidget" native="true">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="extendedModLoadersLayout">
|
||||
<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="QCheckBox" name="liteLoader">
|
||||
<property name="text">
|
||||
<string>LiteLoader</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="babric">
|
||||
<property name="text">
|
||||
<string>Babric</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="btaBabric">
|
||||
<property name="text">
|
||||
<string>BTA (Babric)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue