summaryrefslogtreecommitdiffstats
path: root/gui/pages/ResourcePackPage.h
diff options
context:
space:
mode:
Diffstat (limited to 'gui/pages/ResourcePackPage.h')
-rw-r--r--gui/pages/ResourcePackPage.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/gui/pages/ResourcePackPage.h b/gui/pages/ResourcePackPage.h
new file mode 100644
index 00000000..14321b9b
--- /dev/null
+++ b/gui/pages/ResourcePackPage.h
@@ -0,0 +1,23 @@
+#pragma once
+#include "ModFolderPage.h"
+
+class ResourcePackPage : public ModFolderPage
+{
+public:
+ explicit ResourcePackPage(BaseInstance *instance, QWidget *parent = 0)
+ : ModFolderPage(instance->texturePackList(), "resourcepacks", "resourcepacks",
+ tr("Resource packs"), parent)
+ {
+ m_inst = instance;
+ }
+
+ virtual ~ResourcePackPage() {};
+ virtual bool shouldDisplay() override
+ {
+ return !m_inst->traits().contains("no-texturepacks") &&
+ !m_inst->traits().contains("texturepacks");
+ }
+
+private:
+ BaseInstance *m_inst;
+};