5#include "Components/Button.h"
6#include "Components/Image.h"
7#include "CoreMinimal.h"
8#include "StreamWidget.h"
10#include "IconButton.generated.h"
24 UFUNCTION(BlueprintCallable, Category =
"Icon Button")
25 void SetEnabled(
bool bInEnabled);
26 UFUNCTION(BlueprintCallable, Category =
"Icon Button")
27 void SetIconFromTexture(UTexture2D* Texture);
28 UFUNCTION(BlueprintCallable, Category =
"Icon Button")
29 void SetIconPadding(
const FMargin& InIconPadding);
30 UFUNCTION(BlueprintCallable, Category =
"Icon Button")
31 void SetIconPaletteColor(
const FName& InPaletteColor);
32 UFUNCTION(BlueprintCallable, Category =
"Icon Button")
33 void SetEnabledBackgroundColor(
const FName& InPaletteColor);
34 UFUNCTION(BlueprintCallable, Category =
"Icon Button")
35 void SetDisabledBackgroundColor(
const FName& InPaletteColor);
37 UPROPERTY(EditAnywhere, Category = Defaults)
38 UTexture2D* IconTexture;
40 UPROPERTY(EditAnywhere, Category = Defaults)
41 UTexture2D* DisabledIconTexture;
43 UPROPERTY(EditAnywhere, Category = Defaults)
46 UPROPERTY(EditAnywhere, Category = Defaults)
47 FName IconPaletteColor = TEXT(
"text-high-emphasis");
48 UPROPERTY(EditAnywhere, Category = Defaults)
49 FName EnabledBackgroundColor = TEXT(
"accent-primary");
50 UPROPERTY(EditAnywhere, Category = Defaults)
51 FName DisabledBackgroundColor = TEXT(
"disabled");
53 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Defaults)
bool bEnabled =
true;
56 UPROPERTY(BlueprintAssignable, Category =
"Button|Event")
57 FOnButtonClickedEvent OnClicked;
60 UPROPERTY(meta = (BindWidget))
63 UPROPERTY(meta = (BindWidget))
66 UPROPERTY(EditAnywhere, Category = Defaults)
67 FButtonStyle EnabledStyle;
68 UPROPERTY(EditAnywhere, Category = Defaults)
69 FButtonStyle DisabledStyle;
72 virtual
void SynchronizeProperties() override;
73 virtual
void NativePreConstruct() override;
74 virtual
void NativeConstruct() override;
75 virtual
void NativeDestruct() override;
78 void OnButtonClicked();