2024-04-14 18:51:14 -07:00
|
|
|
|
#pragma once
|
|
|
|
|
#include "Blueprint/UserWidget.h"
|
|
|
|
|
|
|
|
|
|
#include "GasaUserWidget.generated.h"
|
|
|
|
|
|
|
|
|
|
UCLASS(Blueprintable)
|
|
|
|
|
class GASA_API UGasaUserWidget : public UUserWidget
|
|
|
|
|
{
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
public:
|
|
|
|
|
|
2024-04-21 06:51:51 -07:00
|
|
|
|
UFUNCTION()
|
|
|
|
|
void OnLooseParentCompiled(UBlueprint* BP);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(CallInEditor, Category="Parent (Expriemental)", meta=(
|
|
|
|
|
ToolTip="Exprimental: This will overrite the current LooseParent widgets or create them in this user widget. Beware it will be destructive changes"))
|
|
|
|
|
void GenerateParentHierarchyFromLooseParent();
|
|
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Parent (Expriemental)")
|
|
|
|
|
bool bUpdateOnParentCompile = false;
|
|
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Parent (Expriemental)")
|
|
|
|
|
TSubclassOf<UGasaUserWidget> LooseParent;
|
|
|
|
|
|
2024-04-14 18:51:14 -07:00
|
|
|
|
UPROPERTY(BlueprintReadOnly)
|
|
|
|
|
TObjectPtr<UObject> WidgetController;
|
|
|
|
|
|
|
|
|
|
UGasaUserWidget(FObjectInitializer const& ObjectInitializer);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
|
|
|
void SetWidgetController(UObject* Controller)
|
|
|
|
|
{
|
|
|
|
|
WidgetController = Controller;
|
|
|
|
|
OnWidgetControllerSet();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintImplementableEvent)
|
|
|
|
|
void OnWidgetControllerSet();
|
2024-04-21 06:51:51 -07:00
|
|
|
|
|
|
|
|
|
#pragma region UserWidget
|
|
|
|
|
bool Initialize() override;
|
|
|
|
|
|
|
|
|
|
void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
|
|
|
|
|
|
|
|
|
|
void NativeOnInitialized() override;
|
|
|
|
|
void NativePreConstruct() override;
|
|
|
|
|
#pragma endregion UserWidget
|
2024-04-14 18:51:14 -07:00
|
|
|
|
};
|