KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
UCircularProgressBar.h
이 파일의 문서화 페이지로 가기
1// Copyright (c) 2025 Doppleddiggong. All rights reserved. Unauthorized copying, modification, or distribution of this file, via any medium is strictly prohibited. Proprietary and confidential.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Blueprint/UserWidget.h"
7#include "UCircularProgressBar.generated.h"
8
12UCLASS()
13class ONEPIECE_API UCircularProgressBar : public UUserWidget
14{
15 GENERATED_BODY()
16
17protected:
18 virtual void NativePreConstruct() override;
19 virtual void NativeTick(const FGeometry& MyGeometry, float InDeltaTime) override;
20
21public:
22 UFUNCTION(BlueprintCallable, Category = "Progress")
23 void SetPercent(const float InPercent);
24
26 UFUNCTION(BlueprintCallable, Category = "Progress")
27 void StartProgress(const float Start, const float End, const float Duration = 1.0f);
28
30 UFUNCTION(BlueprintCallable, Category = "Progress")
31 void StopProgress();
32
33private:
34 void ApplyStyle();
35
36 // 이징 함수
37 FORCEINLINE double easeOutSine(const double Value)
38 {
39 return FMath::Sin((Value * PI) / 2.0);
40 }
41
42public:
43 UPROPERTY(meta = (BindWidget), BlueprintReadOnly)
44 class UImage* Img_CircularBar;
45
47 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Progress", meta = (ClampMin = "0.0", ClampMax = "1.0"))
48 float Percent = 0.0f;
49
51 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Style", meta = (ExposeOnSpawn = true))
52 FLinearColor LowColor = FLinearColor(0.9f, 0.2f, 0.2f); // 빨강
53
55 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Style", meta = (ExposeOnSpawn = true))
56 FLinearColor MidColor = FLinearColor(1.0f, 0.8f, 0.2f); // 노랑
57
59 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Style", meta = (ExposeOnSpawn = true))
60 FLinearColor HighColor = FLinearColor(0.2f, 0.9f, 0.3f); // 초록
61
62
63private:
64 bool bIsAnimating = false;
65
66 float AnimStartPercent = 0.0f;
67 float AnimTargetPercent = 0.0f;
68 float AnimElapsedTime = 0.0f;
69 float AnimDuration = 1.0f;
70};
FORCEINLINE double easeOutSine(const double Value)