mirror of
https://github.com/Theaninova/BeatLanguageMapper.git
synced 2026-01-19 16:33:03 +00:00
Mk2Rev1
various bugfixes and such. also bookmarks, temp song loaderm and undo overhaul with near complete multiplayer, but menu items disabled. i really wish i could split this into multiple commits, but i don't know how to work unreal.
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
#pragma once
|
||||
|
||||
#include "ZipUtilityInterface.h"
|
||||
#include "ZipFileFunctionInternalCallback.generated.h"
|
||||
|
||||
/**
|
||||
* This is used to provide a callback for unzipping single files, it ends up getting called from the ListFiles lambda.
|
||||
*/
|
||||
UCLASS(ClassGroup = ZipUtility)
|
||||
class ZIPUTILITY_API UZipFileFunctionInternalCallback : public UObject, public IZipUtilityInterface
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
private:
|
||||
|
||||
/** Compression format used to unzip */
|
||||
UPROPERTY(Transient)
|
||||
TEnumAsByte<ZipUtilityCompressionFormat> CompressionFormat;
|
||||
|
||||
/** Path of the file */
|
||||
UPROPERTY(Transient)
|
||||
FString File;
|
||||
|
||||
UPROPERTY(Transient)
|
||||
FString DestinationFolder;
|
||||
|
||||
/** Current File index parsed */
|
||||
UPROPERTY(Transient)
|
||||
int32 FileIndex = 0;
|
||||
|
||||
/** Callback object */
|
||||
UPROPERTY(Transient)
|
||||
UObject* Callback;
|
||||
|
||||
UPROPERTY(Transient)
|
||||
bool bSingleFile;
|
||||
|
||||
UPROPERTY(Transient)
|
||||
bool bFileFound;
|
||||
|
||||
UPROPERTY(Transient)
|
||||
bool bUnzipto;
|
||||
|
||||
public:
|
||||
UZipFileFunctionInternalCallback();
|
||||
|
||||
//IZipUtilityInterface overrides
|
||||
virtual void OnProgress_Implementation(const FString& archive, float percentage, int32 bytes) override {};
|
||||
|
||||
virtual void OnDone_Implementation(const FString& archive, EZipUtilityCompletionState CompletionState) override {};
|
||||
|
||||
virtual void OnStartProcess_Implementation(const FString& archive, int32 bytes) override {};
|
||||
|
||||
virtual void OnFileDone_Implementation(const FString& archive, const FString& file) override {
|
||||
UE_LOG(LogTemp, Log, TEXT("OnFileDone_Implementation"));
|
||||
};
|
||||
|
||||
virtual void OnFileFound_Implementation(const FString& archive, const FString& fileIn, int32 size) override;
|
||||
|
||||
void SetCallback(const FString& FileName, UObject* CallbackIn, TEnumAsByte<ZipUtilityCompressionFormat> CompressionFormatIn = ZipUtilityCompressionFormat::COMPRESSION_FORMAT_UNKNOWN);
|
||||
void SetCallback(const FString& FileName, const FString& DestinationFolder, UObject* CallbackIn, TEnumAsByte<ZipUtilityCompressionFormat> CompressionFormatIn = ZipUtilityCompressionFormat::COMPRESSION_FORMAT_UNKNOWN);
|
||||
|
||||
FORCEINLINE bool GetSingleFile() const { return bSingleFile; }
|
||||
FORCEINLINE void SetSingleFile(bool val) { bSingleFile = val; }
|
||||
};
|
||||
Reference in New Issue
Block a user