mirror of
https://github.com/Theaninova/BeatLanguageMapper.git
synced 2026-01-21 09:23:02 +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,51 @@
|
||||
#include "ZipUtilityPrivatePCH.h"
|
||||
#include "ZipFileFunctionInternalCallback.h"
|
||||
|
||||
UZipFileFunctionInternalCallback::UZipFileFunctionInternalCallback()
|
||||
{
|
||||
CompressionFormat = ZipUtilityCompressionFormat::COMPRESSION_FORMAT_UNKNOWN;
|
||||
DestinationFolder = FString();
|
||||
File = FString();
|
||||
FileIndex = 0;
|
||||
Callback = NULL;
|
||||
}
|
||||
|
||||
void UZipFileFunctionInternalCallback::OnFileFound_Implementation(const FString& archive, const FString& fileIn, int32 size)
|
||||
{
|
||||
if (!bFileFound && fileIn.ToLower().Contains(File.ToLower()))
|
||||
{
|
||||
TArray<int32> FileIndices = { FileIndex };
|
||||
|
||||
if (bUnzipto)
|
||||
{
|
||||
UZipFileFunctionLibrary::UnzipFilesTo(FileIndices, archive, DestinationFolder, Callback, CompressionFormat);
|
||||
}
|
||||
else
|
||||
{
|
||||
UZipFileFunctionLibrary::UnzipFiles(FileIndices, archive, Callback, CompressionFormat);
|
||||
}
|
||||
|
||||
if (bSingleFile)
|
||||
{
|
||||
bFileFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
FileIndex++;
|
||||
}
|
||||
|
||||
void UZipFileFunctionInternalCallback::SetCallback(const FString& FileName, UObject* CallbackIn, TEnumAsByte<ZipUtilityCompressionFormat> CompressionFormatIn /*= ZipUtilityCompressionFormat::COMPRESSION_FORMAT_UNKNOWN*/)
|
||||
{
|
||||
File = FileName;
|
||||
Callback = CallbackIn;
|
||||
CompressionFormat = CompressionFormatIn;
|
||||
FileIndex = 0;
|
||||
}
|
||||
|
||||
void UZipFileFunctionInternalCallback::SetCallback(const FString& FileName, const FString& DestinationFolderIn, UObject* CallbackIn, TEnumAsByte<ZipUtilityCompressionFormat> CompressionFormatIn /*= ZipUtilityCompressionFormat::COMPRESSION_FORMAT_UNKNOWN*/)
|
||||
{
|
||||
SetCallback(FileName, CallbackIn, CompressionFormatIn);
|
||||
|
||||
bUnzipto = true;
|
||||
DestinationFolder = DestinationFolderIn;
|
||||
}
|
||||
Reference in New Issue
Block a user