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>
This commit is contained in:
23
launcher/ui/pages/modplatform/TexturePackModel.h
Normal file
23
launcher/ui/pages/modplatform/TexturePackModel.h
Normal file
@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "meta/VersionList.h"
|
||||
#include "ui/pages/modplatform/ResourcePackModel.h"
|
||||
|
||||
namespace ResourceDownload {
|
||||
|
||||
class TexturePackResourceModel : public ResourcePackResourceModel {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TexturePackResourceModel(BaseInstance const& inst, ResourceAPI* api);
|
||||
|
||||
[[nodiscard]] inline ::Version maximumTexturePackVersion() const { return { "1.6" }; }
|
||||
|
||||
ResourceAPI::SearchArgs createSearchArguments() override;
|
||||
ResourceAPI::VersionSearchArgs createVersionsArguments(QModelIndex&) override;
|
||||
|
||||
protected:
|
||||
Meta::VersionList::Ptr m_version_list;
|
||||
};
|
||||
|
||||
} // namespace ResourceDownload
|
Reference in New Issue
Block a user