summaryrefslogtreecommitdiffstats
path: root/application/InstancePageProvider.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-04-05 22:00:32 +0200
committerPetr Mrázek <peterix@gmail.com>2015-04-13 00:15:23 +0200
commit9df2f1fa5c455e4e75caf3f5ae6dbe4c34b77d51 (patch)
tree3fa8c4ca4f1a0333bbf4183edba7f6f9a98f1f0e /application/InstancePageProvider.h
parentfe540e5dda903156b1037559752fc5332375f465 (diff)
downloadMultiMC-9df2f1fa5c455e4e75caf3f5ae6dbe4c34b77d51.tar
MultiMC-9df2f1fa5c455e4e75caf3f5ae6dbe4c34b77d51.tar.gz
MultiMC-9df2f1fa5c455e4e75caf3f5ae6dbe4c34b77d51.tar.lz
MultiMC-9df2f1fa5c455e4e75caf3f5ae6dbe4c34b77d51.tar.xz
MultiMC-9df2f1fa5c455e4e75caf3f5ae6dbe4c34b77d51.zip
NOISSUE fix legacy edit instance
Diffstat (limited to 'application/InstancePageProvider.h')
-rw-r--r--application/InstancePageProvider.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/application/InstancePageProvider.h b/application/InstancePageProvider.h
index a19e21c8..9cc97c4a 100644
--- a/application/InstancePageProvider.h
+++ b/application/InstancePageProvider.h
@@ -1,5 +1,6 @@
#pragma once
#include "minecraft/OneSixInstance.h"
+#include "minecraft/LegacyInstance.h"
#include "pages/BasePage.h"
#include "pages/VersionPage.h"
#include "pages/ModFolderPage.h"
@@ -10,8 +11,10 @@
#include "pages/InstanceSettingsPage.h"
#include "pages/OtherLogsPage.h"
#include "pages/BasePageProvider.h"
+#include "pages/LegacyJarModPage.h"
#include <pathutils.h>
+
class InstancePageProvider : public QObject, public BasePageProvider
{
Q_OBJECT
@@ -40,6 +43,24 @@ public:
values.append(new InstanceSettingsPage(onesix.get()));
values.append(new OtherLogsPage(onesix->minecraftRoot()));
}
+ std::shared_ptr<LegacyInstance> legacy = std::dynamic_pointer_cast<LegacyInstance>(inst);
+ if(legacy)
+ {
+ QList<BasePage *> values;
+ // FIXME: actually implement the legacy instance upgrade, then enable this.
+ //values.append(new LegacyUpgradePage(this));
+ values.append(new LegacyJarModPage(legacy.get()));
+ values.append(new ModFolderPage(legacy.get(), legacy->loaderModList(), "mods", "loadermods", tr("Loader mods"),
+ "Loader-mods"));
+ values.append(new ModFolderPage(legacy.get(), legacy->coreModList(), "coremods", "coremods", tr("Core mods"),
+ "Loader-mods"));
+ values.append(new TexturePackPage(legacy.get()));
+ values.append(new NotesPage(legacy.get()));
+ values.append(new ScreenshotsPage(PathCombine(legacy->minecraftRoot(), "screenshots")));
+ values.append(new InstanceSettingsPage(legacy.get()));
+ values.append(new OtherLogsPage(legacy->minecraftRoot()));
+ return values;
+ }
return values;
}