Data pack management

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2023-11-28 12:30:13 +00:00
parent 40cfa145ee
commit 284e536e81
No known key found for this signature in database
GPG key ID: 5E39D70B4C93C38E
29 changed files with 943 additions and 15 deletions

View file

@ -25,6 +25,7 @@
#include <QLayout>
#include "QObjectPtr.h"
#include "minecraft/mod/DataPackFolderModel.h"
#include "minecraft/mod/tasks/GetModDependenciesTask.h"
#include "modplatform/ModIndex.h"
#include "ui/pages/BasePageProvider.h"
@ -166,4 +167,21 @@ class ShaderPackDownloadDialog final : public ResourceDownloadDialog {
BaseInstance* m_instance;
};
class DataPackDownloadDialog final : public ResourceDownloadDialog {
Q_OBJECT
public:
explicit DataPackDownloadDialog(QWidget* parent, const std::shared_ptr<DataPackFolderModel>& data_packs, BaseInstance* instance);
~DataPackDownloadDialog() override = default;
//: String that gets appended to the data pack download dialog title ("Download " + resourcesString())
[[nodiscard]] QString resourcesString() const override { return tr("data packs"); }
[[nodiscard]] QString geometrySaveKey() const override { return "DataPackDownloadGeometry"; }
QList<BasePage*> getPages() override;
private:
BaseInstance* m_instance;
};
} // namespace ResourceDownload