Files
BusyRabbit/Source/BusyRabbit/Public/UIFramework/UIManager.h
2025-10-28 23:51:17 +08:00

35 lines
683 B
C++

#pragma once
#include "UIManager.generated.h"
class UPW_RootWidget;
class UPW_WidgetPanel;
UCLASS(BlueprintType)
class UPW_UIManager : public UObject
{
GENERATED_BODY()
public:
bool AttachUIDisplay(UPW_RootWidget* InRootWidget);
void DetachUIDisplay()const;
void SetRootWidget(UPW_RootWidget* NewRootWidget);
public:
UFUNCTION(BlueprintCallable)
static UPW_UIManager* Get(UWorld* World);
UFUNCTION(BlueprintCallable)
bool PushWidgetPanel(UPW_WidgetPanel* Panel);
UFUNCTION(BlueprintCallable)
void PopWidgetPanel(UPW_WidgetPanel* Panel);
protected:
UPROPERTY()
TArray<UPW_WidgetPanel*> WidgetPanelStack;
UPROPERTY()
TObjectPtr<UPW_RootWidget> RootWidget;
};