GASATHON/Project/Source/Gasa/UI/GlobeProgressBar.h

96 lines
2.8 KiB
C
Raw Normal View History

2024-10-19 18:33:20 -07:00
#pragma once
2024-04-16 14:18:06 -07:00
#include "GasaCommon.h"
#include "GasaUserWidget.h"
#include "GlobeProgressBar.generated.h"
UCLASS()
class GASA_API UGlobeProgressBar : public UGasaUserWidget
{
GENERATED_BODY()
public:
// Just learning: https://benui.ca/unreal/build-widgets-in-editor/?utm_medium=social&utm_source=Discord
UFUNCTION(CallInEditor, Category="Generate Designer Widget Template")
void GenerateDesignerWidgetTemplate();
2024-10-19 18:33:20 -07:00
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Globe")
float GhostTargetPercent;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Globe")
float GhostPercentInterpolationSpeed;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Globe")
float GhostPercentChangeDelay;
FTimerHandle GhostPercentChangeTimer;
UFUNCTION()
void GhostPercentUpdateViaTimer();
2024-04-16 14:18:06 -07:00
#pragma region Bindings
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (BindWidgetOptional), Category="Globe")
UGasaSizeBox* Root_SB;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (BindWidgetOptional), Category="Globe")
UGasaOverlay* Overlay;
2024-04-16 14:18:06 -07:00
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (BindWidgetOptional), Category="Globe")
UGasaImage* Bezel;
2024-04-16 14:18:06 -07:00
2024-10-19 18:33:20 -07:00
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (BindWidgetOptional), Category="Globe")
UGasaProgressBar* GhostBar;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (BindWidgetOptional), Category="Globe")
2024-04-16 14:18:06 -07:00
UGasaProgressBar* Bar;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (BindWidgetOptional), Category="Globe")
UGasaImage* Glass;
2024-10-19 18:33:20 -07:00
2024-04-16 14:18:06 -07:00
UFUNCTION(BlueprintCallable, Category="Globe")
void SetBezelStyle(FSlateBrush brush);
2024-04-16 14:18:06 -07:00
UFUNCTION(BlueprintCallable, Category="Globe")
void SetBarPadding( FMargin margin );
UFUNCTION(BlueprintCallable, Category="Globe")
void SetBarStyle(FProgressBarStyle style);
2024-10-19 18:33:20 -07:00
UFUNCTION(BlueprintCallable, Category="Globe")
void SetGhostBarStyle(FProgressBarStyle style);
2024-04-16 14:18:06 -07:00
UFUNCTION(BlueprintCallable, Category="Globe")
void SetGlassPadding( FMargin margin );
UFUNCTION(BlueprintCallable, Category="Globe")
void SetGlassStyle(FSlateBrush brush);
2024-04-21 21:30:29 -07:00
UFUNCTION(BlueprintCallable, Category="Globe")
void SetPercentage(float CurrentValue, float MaxValue);
2024-04-16 14:18:06 -07:00
UFUNCTION(BlueprintCallable, Category="Globe")
void SetSize(float width, float height);
#pragma endregion Bindings
2024-04-16 14:18:06 -07:00
// UGlobeProgressBar(FObjectInitializer const& ObjectInitializer);
#pragma region Widget
void SynchronizeProperties() override;
#pragma endregion Widget
void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
2024-04-16 14:18:06 -07:00
#pragma region UserWidget
void NativePreConstruct() override;
2024-10-19 18:33:20 -07:00
void NativeTick(const FGeometry& MyGeometry, float InDeltaTime);
2024-04-16 14:18:06 -07:00
#pragma endregion UserWidget
#pragma region Object
void Serialize(FArchive& Ar) override;
void Serialize(FStructuredArchive::FRecord Record) override;
#pragma endregion Object
2024-04-16 14:18:06 -07:00
};