summaryrefslogtreecommitdiffstats
path: root/logic/LegacyInstance.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-08-25 01:32:42 +0200
committerPetr Mrázek <peterix@gmail.com>2013-08-25 01:32:42 +0200
commitd884f849d60db44f05a6a6b22f4ffcf520900389 (patch)
tree22387a110c1e7dfeb5f68983b1f0ef0a13ba0aaa /logic/LegacyInstance.cpp
parente3b55067eb51ee82e72b41a1919406d768e00b89 (diff)
downloadMultiMC-d884f849d60db44f05a6a6b22f4ffcf520900389.tar
MultiMC-d884f849d60db44f05a6a6b22f4ffcf520900389.tar.gz
MultiMC-d884f849d60db44f05a6a6b22f4ffcf520900389.tar.lz
MultiMC-d884f849d60db44f05a6a6b22f4ffcf520900389.tar.xz
MultiMC-d884f849d60db44f05a6a6b22f4ffcf520900389.zip
All kinds of incremental improvements
Redone the instance action toolbar: * Removed all the dead actions * Change icon and Rename are now morphed into a header * Added button for opening the config folder Implemented support for loose files and folders as legacy jar mods Added texture pack support
Diffstat (limited to 'logic/LegacyInstance.cpp')
-rw-r--r--logic/LegacyInstance.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/logic/LegacyInstance.cpp b/logic/LegacyInstance.cpp
index 9e191740..dce1d2f3 100644
--- a/logic/LegacyInstance.cpp
+++ b/logic/LegacyInstance.cpp
@@ -127,6 +127,19 @@ QSharedPointer< ModList > LegacyInstance::loaderModList()
return d->loader_mod_list;
}
+QSharedPointer< ModList > LegacyInstance::texturePackList()
+{
+ I_D(LegacyInstance);
+ if(!d->texture_pack_list)
+ {
+ d->texture_pack_list.reset(new ModList(texturePackDir()));
+ }
+ else
+ d->texture_pack_list->update();
+ return d->texture_pack_list;
+}
+
+
QDialog * LegacyInstance::createModEditDialog ( QWidget* parent )
{
return new LegacyModEditDialog(this, parent);
@@ -168,6 +181,10 @@ QString LegacyInstance::resourceDir() const
{
return PathCombine(minecraftRoot(), "resources");
}
+QString LegacyInstance::texturePackDir() const
+{
+ return PathCombine(minecraftRoot(), "texturepacks");
+}
QString LegacyInstance::runnableJar() const
{
@@ -178,6 +195,13 @@ QString LegacyInstance::modListFile() const
{
return PathCombine(instanceRoot(), "modlist");
}
+
+QString LegacyInstance::instanceConfigFolder() const
+{
+ return PathCombine(minecraftRoot(), "config");
+}
+
+
/*
bool LegacyInstance::shouldUpdateCurrentVersion() const
{
@@ -285,3 +309,15 @@ QString LegacyInstance::defaultCustomBaseJar() const
return PathCombine(binDir(), "mcbackup.jar");
}
+bool LegacyInstance::menuActionEnabled ( QString action_name ) const
+{
+ return true;
+}
+
+QString LegacyInstance::getStatusbarDescription()
+{
+ if(shouldUpdate())
+ return "Legacy : " + currentVersionId() + " -> " + intendedVersionId();
+ else
+ return "Legacy : " + currentVersionId();
+}