12#include "CoreMinimal.h"
13#include "Widgets/WSBase.h"
14#include "Components/Image.h"
15#include "Components/InvalidationBox.h"
16#include "Components/Overlay.h"
17#include "Components/ScaleBox.h"
19#include "WSModernCard.generated.h"
21UENUM(Blueprintable, BlueprintType, META=(Tooltip =
"Depicts the background style target of the widget."))
22enum class EBackgroundStyle : uint8
24 Solid UMETA(DisplayName=
"Solid"),
25 OutLine UMETA(DisplayName=
"Outline"),
27 BackgroundStyle_Max UMETA(Hidden),
31UENUM(Blueprintable, BlueprintType, META=(Tooltip =
"The roundness style of the widget corners."))
32enum class ECornerStyle : uint8
34 Rounded UMETA(DisplayName =
"Rounded"),
35 Pill UMETA(DisplayName =
"Pill"),
37 CornerStyle_Max UMETA(Hidden),
40UENUM(Blueprintable, BlueprintType, META=(Tooltip =
"The style of the widget drop shadows."))
41enum class EShadowStyle : uint8
43 None UMETA(DisplayName=
"None"),
44 Small UMETA(DisplayName=
"Short"),
45 Long UMETA(DisplayName=
"Long"),
47 ButtonShadowStyle_Max UMETA(Hidden),
60 virtual TSharedRef<SWidget> RebuildWidget()
override;
61 virtual int32 NativePaint(
const FPaintArgs& Args,
const FGeometry& AllottedGeometry,
const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId,
const FWidgetStyle& InWidgetStyle,
bool bParentEnabled)
const override;
62 virtual void SynchronizeProperties()
override;;
63 virtual void InitializeStyling()
override;
64 virtual void UpdateStyling()
override;
67 const float BaseDropShadowOpacity = .5;
70 mutable float ShadowLength;
74 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
75 USizeBox* SizeBox =
nullptr;
77 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
78 UScaleBox* ScaleBox =
nullptr;
80 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
81 UOverlay* Overlay =
nullptr;
83 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
84 UImage* DropShadow =
nullptr;
86 UPROPERTY(BlueprintReadOnly, Category =
"Widgets")
87 UImage* Background =
nullptr;
93 UPROPERTY(EditAnywhere, Category=
"Widget Studio")
94 EPalette Color = EPalette::PrimaryBackground;
97 UPROPERTY(EditAnywhere, Category =
"Widget Studio|Style")
98 EShadowStyle ShadowStyle = EShadowStyle::Small;
101 UPROPERTY(EditAnywhere, Category =
"Widget Studio|Style")
102 bool bEnableShadowHoverAnimation =
false;
108 UFUNCTION(BlueprintPure, Category=
"Widget Studio|Helper")
109 EPalette GetColor()
const;
112 UFUNCTION(BlueprintPure, Category=
"Widget Studio|Helper")
113 bool IsShadowHoverAnimationEnabled()
const;
116 UFUNCTION(BlueprintPure, Category=
"Widget Studio|Helper")
117 EShadowStyle GetDropShadowStyle()
const;
125 UFUNCTION(BlueprintCallable, Category=
"Widget Studio|Modifier")
126 void SetColor(EPalette NewColor);
132 UFUNCTION(BlueprintCallable, Category=
"Widget Studio|Modifier")
133 void SetShadowHoverAnimationEnabled(
bool NewState);
139 UFUNCTION(BlueprintCallable, Category=
"Widget Studio|Modifier")
140 void SetShadowStyle(EShadowStyle NewStyle);