diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-06-08 18:02:20 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-06-09 01:38:31 +0200 |
commit | 84ae67fff5bfa9de011daf4144802569687f1e6b (patch) | |
tree | 47d7ec4b8484b6aa505e8200ba35b3ead60980ab /logic | |
parent | 694067c603ec14eba16e452e77bc7ce442fa36dd (diff) | |
download | MultiMC-84ae67fff5bfa9de011daf4144802569687f1e6b.tar MultiMC-84ae67fff5bfa9de011daf4144802569687f1e6b.tar.gz MultiMC-84ae67fff5bfa9de011daf4144802569687f1e6b.tar.lz MultiMC-84ae67fff5bfa9de011daf4144802569687f1e6b.tar.xz MultiMC-84ae67fff5bfa9de011daf4144802569687f1e6b.zip |
Page dialog for legacy instances.
Diffstat (limited to 'logic')
-rw-r--r-- | logic/LegacyInstance.cpp | 20 | ||||
-rw-r--r-- | logic/LegacyInstance.h | 7 | ||||
-rw-r--r-- | logic/OneSixInstance.cpp | 3 | ||||
-rw-r--r-- | logic/OneSixInstance.h | 2 |
4 files changed, 27 insertions, 5 deletions
diff --git a/logic/LegacyInstance.cpp b/logic/LegacyInstance.cpp index 5bc8bc34..8603022a 100644 --- a/logic/LegacyInstance.cpp +++ b/logic/LegacyInstance.cpp @@ -28,7 +28,9 @@ #include "logic/MinecraftProcess.h" #include "logic/LegacyUpdate.h" #include "logic/icons/IconList.h" -#include <gui/dialogs/LegacyModEditDialog.h> +#include "gui/pages/LegacyUpgradePage.h" +#include "gui/pages/ModFolderPage.h" +#include "gui/pages/LegacyJarModPage.h" LegacyInstance::LegacyInstance(const QString &rootDir, SettingsObject *settings, QObject *parent) @@ -41,6 +43,22 @@ LegacyInstance::LegacyInstance(const QString &rootDir, SettingsObject *settings, settings->registerSetting("IntendedJarVersion", ""); } +QList<BasePage *> LegacyInstance::getPages() +{ + QList<BasePage *> values; + values.append(new LegacyUpgradePage(this)); + values.append(new LegacyJarModPage(this)); + values.append(new ModFolderPage(loaderModList(), "mods", "centralmods", tr("Loader Mods"))); + values.append(new ModFolderPage(coreModList(), "coremods", "viewfolder", tr("Core Mods"))); + values.append(new ModFolderPage(texturePackList(), "texturepacks", "viewfolder", tr("Texture Packs"))); + return values; +} + +QString LegacyInstance::dialogTitle() +{ + return tr("Edit Instance (%1)").arg(name()); +} + std::shared_ptr<Task> LegacyInstance::doUpdate() { // make sure the jar mods list is initialized by asking for it. diff --git a/logic/LegacyInstance.h b/logic/LegacyInstance.h index 3d426601..82dd4fee 100644 --- a/logic/LegacyInstance.h +++ b/logic/LegacyInstance.h @@ -16,11 +16,12 @@ #pragma once #include "BaseInstance.h" +#include "gui/pages/BasePageProvider.h" class ModList; class Task; -class LegacyInstance : public BaseInstance +class LegacyInstance : public BaseInstance, public BasePageProvider { Q_OBJECT public: @@ -34,6 +35,10 @@ public: //! Path to the instance's modlist file. QString modListFile() const; + ////// Edit Instance Dialog stuff ////// + virtual QList<BasePage *> getPages(); + virtual QString dialogTitle(); + ////// Mod Lists ////// std::shared_ptr<ModList> jarModList(); std::shared_ptr<ModList> coreModList(); diff --git a/logic/OneSixInstance.cpp b/logic/OneSixInstance.cpp index 4fd7999a..58781c15 100644 --- a/logic/OneSixInstance.cpp +++ b/logic/OneSixInstance.cpp @@ -29,7 +29,6 @@ #include "logic/assets/AssetsUtils.h" #include "icons/IconList.h" #include "logic/MinecraftProcess.h" -#include "gui/dialogs/InstanceEditDialog.h" #include "gui/pagedialog/PageDialog.h" #include "gui/pages/VersionPage.h" #include <gui/pages/ModFolderPage.h> @@ -59,7 +58,7 @@ QList<BasePage *> OneSixInstance::getPages() { QList<BasePage *> values; values.append(new VersionPage(this)); - values.append(new ModFolderPage(loaderModList(), "mods", "centralmods", tr("Mods"))); + values.append(new ModFolderPage(loaderModList(), "mods", "centralmods", tr("Loader Mods"))); values.append(new ModFolderPage(coreModList(), "coremods", "viewfolder", tr("Core Mods"))); values.append(new ModFolderPage(resourcePackList(), "resourcepacks", "viewfolder", tr("Resource Packs"))); values.append(new ModFolderPage(texturePackList(), "texturepacks", "viewfolder", tr("Texture Packs"))); diff --git a/logic/OneSixInstance.h b/logic/OneSixInstance.h index fae38095..fa98ccf0 100644 --- a/logic/OneSixInstance.h +++ b/logic/OneSixInstance.h @@ -30,7 +30,7 @@ public: virtual ~OneSixInstance(){}; virtual void init() override; - + ////// Edit Instance Dialog stuff ////// virtual QList<BasePage *> getPages(); virtual QString dialogTitle(); |