summaryrefslogtreecommitdiffstats
path: root/application/pages/instance/ResourcePackPage.h
blob: e11c78a3da77154b5ad7925c3d4d49c96e23c853 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once
#include "ModFolderPage.h"
#include "ui_ModFolderPage.h"

class ResourcePackPage : public ModFolderPage
{
    Q_OBJECT
public:
    explicit ResourcePackPage(MinecraftInstance *instance, QWidget *parent = 0)
        : ModFolderPage(instance, instance->resourcePackList(), "resourcepacks",
                        "resourcepacks", tr("Resource packs"), "Resource-packs", parent)
    {
        ui->actionView_configs->setVisible(false);
    }

    virtual ~ResourcePackPage() {}
    virtual bool shouldDisplay() const override
    {
        return !m_inst->traits().contains("no-texturepacks") &&
               !m_inst->traits().contains("texturepacks");
    }
};