aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--launcher/ui/pages/instance/ModFolderPage.cpp50
-rw-r--r--launcher/ui/pages/instance/ModFolderPage.h8
2 files changed, 32 insertions, 26 deletions
diff --git a/launcher/ui/pages/instance/ModFolderPage.cpp b/launcher/ui/pages/instance/ModFolderPage.cpp
index 1b2cde0c..45678db1 100644
--- a/launcher/ui/pages/instance/ModFolderPage.cpp
+++ b/launcher/ui/pages/instance/ModFolderPage.cpp
@@ -112,10 +112,6 @@ ModFolderPage::ModFolderPage(BaseInstance* inst, std::shared_ptr<ModFolderModel>
}
}
-CoreModFolderPage::CoreModFolderPage(BaseInstance* inst, std::shared_ptr<ModFolderModel> mods, QWidget* parent)
- : ModFolderPage(inst, mods, parent)
-{}
-
void ModFolderPage::runningStateChanged(bool running)
{
ExternalResourcesPage::runningStateChanged(running);
@@ -128,27 +124,6 @@ bool ModFolderPage::shouldDisplay() const
return true;
}
-bool CoreModFolderPage::shouldDisplay() const
-{
- if (ModFolderPage::shouldDisplay()) {
- auto inst = dynamic_cast<MinecraftInstance*>(m_instance);
- if (!inst)
- return true;
-
- auto version = inst->getPackProfile();
-
- if (!version)
- return true;
- if (!version->getComponent("net.minecraftforge"))
- return false;
- if (!version->getComponent("net.minecraft"))
- return false;
- if (version->getComponent("net.minecraft")->getReleaseDateTime() < g_VersionFilterData.legacyCutoffDate)
- return true;
- }
- return false;
-}
-
void ModFolderPage::installMods()
{
if (!m_controlsEnabled)
@@ -252,3 +227,28 @@ void ModFolderPage::updateMods()
m_model->update();
}
}
+
+CoreModFolderPage::CoreModFolderPage(BaseInstance* inst, std::shared_ptr<ModFolderModel> mods, QWidget* parent)
+ : ModFolderPage(inst, mods, parent)
+{}
+
+bool CoreModFolderPage::shouldDisplay() const
+{
+ if (ModFolderPage::shouldDisplay()) {
+ auto inst = dynamic_cast<MinecraftInstance*>(m_instance);
+ if (!inst)
+ return true;
+
+ auto version = inst->getPackProfile();
+
+ if (!version)
+ return true;
+ if (!version->getComponent("net.minecraftforge"))
+ return false;
+ if (!version->getComponent("net.minecraft"))
+ return false;
+ if (version->getComponent("net.minecraft")->getReleaseDateTime() < g_VersionFilterData.legacyCutoffDate)
+ return true;
+ }
+ return false;
+}
diff --git a/launcher/ui/pages/instance/ModFolderPage.h b/launcher/ui/pages/instance/ModFolderPage.h
index 93889707..7e305951 100644
--- a/launcher/ui/pages/instance/ModFolderPage.h
+++ b/launcher/ui/pages/instance/ModFolderPage.h
@@ -64,5 +64,11 @@ class CoreModFolderPage : public ModFolderPage {
public:
explicit CoreModFolderPage(BaseInstance* inst, std::shared_ptr<ModFolderModel> mods, QWidget* parent = 0);
virtual ~CoreModFolderPage() = default;
- virtual bool shouldDisplay() const;
+
+ virtual QString displayName() const override { return tr("Core mods"); }
+ virtual QIcon icon() const override { return APPLICATION->getThemedIcon("coremods"); }
+ virtual QString id() const override { return "coremods"; }
+ virtual QString helpPage() const override { return "Core-mods"; }
+
+ virtual bool shouldDisplay() const override;
};