diff --git a/Source/Cut5/Widgets/MicroWidgets/SProcessing.cpp b/Source/Cut5/Widgets/MicroWidgets/SProcessing.cpp new file mode 100644 index 0000000..87768e9 --- /dev/null +++ b/Source/Cut5/Widgets/MicroWidgets/SProcessing.cpp @@ -0,0 +1,64 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "SProcessing.h" +#include "SlateOptMacros.h" +#include "Cut5/Utils/Utils.h" + + +BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION + +void SProcessing::Construct(const FArguments& InArgs) +{ + MaxPercent = InArgs._MaxPercent; + + ChildSlot + [ + SNew(SOverlay) + + SOverlay::Slot() + .HAlign(HAlign_Center) + .VAlign(VAlign_Center) + [ + SNew(SBox) + .WidthOverride(320) + .HeightOverride(445) + [ + SNew(SImage) + .Image(FUtils::GetBrushFromImage(FUtils::GetResourcesPath("ColorPanelBackGround.png"), {320, 445})) + ] + + ] + + SOverlay::Slot() + .HAlign(HAlign_Center) + .VAlign(VAlign_Center) + [ + SNew(SBox) + .WidthOverride(320) + .HeightOverride(445) + [ + SNew(SOverlay) + + SOverlay::Slot() + [ + SNew(SBox) + .HAlign(HAlign_Left) + .VAlign(VAlign_Top) + .Padding(21, 16, 0, 0) + .WidthOverride(32) + .HeightOverride(24) + [ + SNew(SProgressBar).Percent(CurrentPercent / MaxPercent) + ] + ] + ] + ] + + ]; +} + + +void SProcessing::Tick(const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime) +{ + +} + +END_SLATE_FUNCTION_BUILD_OPTIMIZATION diff --git a/Source/Cut5/Widgets/MicroWidgets/SProcessing.h b/Source/Cut5/Widgets/MicroWidgets/SProcessing.h new file mode 100644 index 0000000..3bd25d4 --- /dev/null +++ b/Source/Cut5/Widgets/MicroWidgets/SProcessing.h @@ -0,0 +1,27 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Widgets/SCompoundWidget.h" +#include "Widgets/Notifications/SProgressBar.h" + +/** + * + */ +class CUT5_API SProcessing : public SCompoundWidget +{ +public: + SLATE_BEGIN_ARGS(SProcessing) + { + } + SLATE_ARGUMENT(float, MaxPercent) + SLATE_END_ARGS() + + /** Constructs this widget with InArgs */ + void Construct(const FArguments& InArgs); + virtual void Tick(const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override; + float MaxPercent = 1.0f; + float CurrentPercent = 0.0f; + TSharedPtr ProgressBar; +}; diff --git a/output.avi b/output.avi new file mode 100644 index 0000000..36fabe3 Binary files /dev/null and b/output.avi differ diff --git a/黑白闪变.avi b/黑白闪变.avi new file mode 100644 index 0000000..c75da69 Binary files /dev/null and b/黑白闪变.avi differ