This commit is contained in:
Sch 2023-11-01 16:09:08 +08:00
parent 3f0df00dce
commit a56dbb48e9
4 changed files with 91 additions and 0 deletions

View File

@ -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

View File

@ -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<SProgressBar> ProgressBar;
};

BIN
output.avi Normal file

Binary file not shown.

BIN
黑白闪变.avi Normal file

Binary file not shown.