diff options
author | flow <flowlnlnln@gmail.com> | 2023-01-29 18:07:49 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2023-02-05 17:02:56 -0300 |
commit | ada5e88eb933a41691121316c78cd2e564965fa0 (patch) | |
tree | 05cbf24f0e42e2a673ac8fafcd04de434b9d1b0d /launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.h | |
parent | b724607e31d102c50cb42225b4a31f2932b2eb61 (diff) | |
download | PrismLauncher-ada5e88eb933a41691121316c78cd2e564965fa0.tar.gz PrismLauncher-ada5e88eb933a41691121316c78cd2e564965fa0.tar.bz2 PrismLauncher-ada5e88eb933a41691121316c78cd2e564965fa0.zip |
feat(RD): add texture pack downloader
This extends the resource pack downloader, with the custom behavior of
filtering the versions that shows up, to those <= 1.6. As always, Flame
is funky and requires a bit more workarounds than average.
This will also get a nice improvement when the Version parsing and
comparison PR gets merged! :D
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.h')
-rw-r--r-- | launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.h b/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.h index 8733a1b2..f4eb5ce0 100644 --- a/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.h +++ b/launcher/ui/pages/modplatform/modrinth/ModrinthResourcePages.h @@ -43,6 +43,7 @@ #include "ui/pages/modplatform/ModPage.h" #include "ui/pages/modplatform/ResourcePackPage.h" +#include "ui/pages/modplatform/TexturePackPage.h" #include "ui/pages/modplatform/ShaderPackPage.h" namespace ResourceDownload { @@ -103,6 +104,29 @@ class ModrinthResourcePackPage : public ResourcePackResourcePage { [[nodiscard]] inline auto helpPage() const -> QString override { return ""; } }; +class ModrinthTexturePackPage : public TexturePackResourcePage { + Q_OBJECT + + public: + static ModrinthTexturePackPage* create(TexturePackDownloadDialog* dialog, BaseInstance& instance) + { + return TexturePackResourcePage::create<ModrinthTexturePackPage>(dialog, instance); + } + + ModrinthTexturePackPage(TexturePackDownloadDialog* dialog, BaseInstance& instance); + ~ModrinthTexturePackPage() override = default; + + [[nodiscard]] bool shouldDisplay() const override; + + [[nodiscard]] inline auto displayName() const -> QString override { return Modrinth::displayName(); } + [[nodiscard]] inline auto icon() const -> QIcon override { return Modrinth::icon(); } + [[nodiscard]] inline auto id() const -> QString override { return Modrinth::id(); } + [[nodiscard]] inline auto debugName() const -> QString override { return Modrinth::debugName(); } + [[nodiscard]] inline auto metaEntryBase() const -> QString override { return Modrinth::metaEntryBase(); } + + [[nodiscard]] inline auto helpPage() const -> QString override { return ""; } +}; + class ModrinthShaderPackPage : public ShaderPackResourcePage { Q_OBJECT |