New
This commit is contained in:
parent
3f0df00dce
commit
a56dbb48e9
64
Source/Cut5/Widgets/MicroWidgets/SProcessing.cpp
Normal file
64
Source/Cut5/Widgets/MicroWidgets/SProcessing.cpp
Normal 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
|
27
Source/Cut5/Widgets/MicroWidgets/SProcessing.h
Normal file
27
Source/Cut5/Widgets/MicroWidgets/SProcessing.h
Normal 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
BIN
output.avi
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user