Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
GASHUDWidgetComponent.h
이 파일의 문서화 페이지로 가기
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Components/ActorComponent.h"
7#include "Data/UI/UIContext.h"
9#include "GASHUDWidgetComponent.generated.h"
10
11class UUserWidgetBase;
13
18UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))
19class CK_UE_API UGASHUDWidgetComponent : public UActorComponent, public IAbilityBasedWidgetInterface
20{
21 GENERATED_BODY()
22
23public:
24 UGASHUDWidgetComponent();
25
26public:
27 virtual void InitWidget() override;
28 virtual void DeinitWidget() override;
29
30 virtual void Register() override;
31 virtual void Unregister() override;
32
33protected:
34 virtual void BeginPlay() override;
35 virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
36
37protected:
38 UUserWidgetBase* GetWidget();
39 UUserWidgetBase* CreateWidgetAndPush();
40
41
42public:
43 FORCEINLINE UUserWidgetBase* GetScreenWidget() const
44 {
45 return ScreenWidget;
46 }
47
48 FORCEINLINE TSubclassOf<UUserWidgetBase> GetWidgetClass() const
49 {
50 return UIContext.WidgetClass;
51 }
52
53protected:
54 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Widget")
55 bool bRegisterOnInit = false;
56
57 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Widget")
58 FUIContext UIContext;
59
60protected:
61 UPROPERTY(Transient)
62 TObjectPtr<UUserWidgetBase> ScreenWidget;
63};
Definition AbilityBasedWidgetInterface.h:20
Definition PlayerRootHUDWidget.h:27
Definition UserWidgetBase.h:33
Definition UIContext.h:10