diff options
author | flow <flowlnlnln@gmail.com> | 2022-12-02 06:39:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-02 06:39:54 -0800 |
commit | fa98bf1ee7cfd9fcbc956b2c603f72398d0d69ce (patch) | |
tree | 9865ad46c880b9a808519acdbb4e81cb32289aba /launcher/minecraft/mod/tasks/LocalTexturePackParseTask.h | |
parent | d1a1b8b6e8dc2eada28db9277a449e1a63fe9cdf (diff) | |
parent | 3cc987a5b4afdc0b8df5be420fc6d1e2a19fbe66 (diff) | |
download | PrismLauncher-fa98bf1ee7cfd9fcbc956b2c603f72398d0d69ce.tar.gz PrismLauncher-fa98bf1ee7cfd9fcbc956b2c603f72398d0d69ce.tar.bz2 PrismLauncher-fa98bf1ee7cfd9fcbc956b2c603f72398d0d69ce.zip |
Merge pull request #481 from ryanccn/import-resource-pack-dialog-uwu
Diffstat (limited to 'launcher/minecraft/mod/tasks/LocalTexturePackParseTask.h')
-rw-r--r-- | launcher/minecraft/mod/tasks/LocalTexturePackParseTask.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/launcher/minecraft/mod/tasks/LocalTexturePackParseTask.h b/launcher/minecraft/mod/tasks/LocalTexturePackParseTask.h index cb0e404a..9f7aab75 100644 --- a/launcher/minecraft/mod/tasks/LocalTexturePackParseTask.h +++ b/launcher/minecraft/mod/tasks/LocalTexturePackParseTask.h @@ -27,13 +27,19 @@ #include "tasks/Task.h" namespace TexturePackUtils { -bool process(TexturePack& pack); -void processZIP(TexturePack& pack); -void processFolder(TexturePack& pack); +enum class ProcessingLevel { Full, BasicInfoOnly }; + +bool process(TexturePack& pack, ProcessingLevel level = ProcessingLevel::Full); + +void processZIP(TexturePack& pack, ProcessingLevel level = ProcessingLevel::Full); +void processFolder(TexturePack& pack, ProcessingLevel level = ProcessingLevel::Full); void processPackTXT(TexturePack& pack, QByteArray&& raw_data); void processPackPNG(TexturePack& pack, QByteArray&& raw_data); + +/** Checks whether a file is valid as a texture pack or not. */ +bool validate(QFileInfo file); } // namespace TexturePackUtils class LocalTexturePackParseTask : public Task { |