Ed_
6765478a9d
- Enabled a few more plugins - Added clang formatting straight from the GasaGen cpp. - Setup auto-generation of the DevOptionsCache - Messed around with generating widgettree hiearchy from template widget
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
#pragma once
|
|
#include "Blueprint/UserWidget.h"
|
|
|
|
#include "GasaUserWidget.generated.h"
|
|
|
|
UCLASS(Blueprintable)
|
|
class GASA_API UGasaUserWidget : public UUserWidget
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
|
|
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;
|
|
|
|
UPROPERTY(BlueprintReadOnly)
|
|
TObjectPtr<UObject> WidgetController;
|
|
|
|
UGasaUserWidget(FObjectInitializer const& ObjectInitializer);
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void SetWidgetController(UObject* Controller)
|
|
{
|
|
WidgetController = Controller;
|
|
OnWidgetControllerSet();
|
|
}
|
|
|
|
UFUNCTION(BlueprintImplementableEvent)
|
|
void OnWidgetControllerSet();
|
|
|
|
#pragma region UserWidget
|
|
bool Initialize() override;
|
|
|
|
void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
|
|
|
|
void NativeOnInitialized() override;
|
|
void NativePreConstruct() override;
|
|
#pragma endregion UserWidget
|
|
};
|