Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
ToastRootHUDWidget.h
이 파일의 문서화 페이지로 가기
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "TimerManager.h"
10#include "UI/UserWidgetBase.h"
11#include "ToastRootHUDWidget.generated.h"
12
13class UStackBox;
14class UDataTable;
16
17USTRUCT()
19{
20 GENERATED_BODY()
21
22public:
23 UPROPERTY()
24 TObjectPtr<UToastWidgetBase> ToastWidget;
25
26public:
27 int32 GroupID = 0;
28 FTimerHandle DurationTimerHandle;
29};
30
31USTRUCT()
33{
34 GENERATED_BODY()
35
36public:
37 UPROPERTY()
39};
40
44UCLASS(BlueprintType, Blueprintable)
46{
47 GENERATED_BODY()
48
49public:
50 UFUNCTION(BlueprintCallable, Category = "UI|Toast")
51 bool ShowToastByID(const int32 ToastID, const bool bApplyImmediately = false);
52
53 UFUNCTION(BlueprintCallable, Category = "UI|Toast")
54 bool ShowToastByRowName(const FName ToastRowName, const bool bApplyImmediately = false);
55
56 UFUNCTION(BlueprintCallable, Category = "UI|Toast")
57 void ShowToast(const FDT_ToastMessageTable& InToastData, const bool bApplyImmediately = false);
58
59 UFUNCTION(BlueprintCallable, Category = "UI|Toast")
60 void SetToastDataTable(UDataTable* InToastDataTable);
61
62 UFUNCTION(BlueprintPure, Category = "UI|Toast")
63 UDataTable* GetToastDataTable() const;
64
65protected:
66 virtual void NativeDestruct() override;
67
68protected:
69 bool CanAddToastWidget() const;
70 void EnqueueToast(const FDT_ToastMessageTable& InToastData);
71 void ProcessPendingToastQueue();
72 void ShowToastInternal(const FDT_ToastMessageTable& InToastData);
73 void AddToastWidget(UToastWidgetBase* ToastWidget, const FDT_ToastMessageTable& InToastData);
74 bool TryUpdateActiveToastByGroup(const FDT_ToastMessageTable& InToastData);
75 void RequestOldestToastExit();
76 void StartToastDurationTimer(UToastWidgetBase* ToastWidget, const float ToastDuration);
77 void RequestToastExit(UToastWidgetBase* ToastWidget);
78 void RemoveToastWidget(UToastWidgetBase* ToastWidget);
79 bool TryShowNextToastInGroup(UToastWidgetBase* ToastWidget);
80 const FDT_ToastMessageTable* FindNextToastRowInGroup(const FDT_ToastMessageTable& CurrentToastData);
81
82 UToastWidgetBase* CreateToastWidget(const FDT_ToastMessageTable& InToastData);
83 int32 FindActiveToastIndex(const UToastWidgetBase* ToastWidget) const;
84 int32 FindActiveToastIndexByGroupID(const int32 GroupID) const;
85 UDataTable* ResolveToastDataTable();
86
87protected:
88 UFUNCTION(BlueprintImplementableEvent, Category = "UI|Toast")
89 void OnToastRequested(const FDT_ToastMessageTable& InToastData);
90
91protected:
92 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI|Toast")
93 TSubclassOf<UToastWidgetBase> ToastWidgetClass;
94
95 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI|Toast", meta = (ClampMin = "1"))
96 int32 MaxStackCount = 3;
97
98 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "UI|Toast")
99 TObjectPtr<UDataTable> CachedToastDataTable;
100
101 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "UI|Toast", meta = (BindWidget))
102 TObjectPtr<UStackBox> ToastMessageStack;
103
104 UPROPERTY()
105 TArray<FActiveToastWidgetEntry> ActiveToastWidgets;
106
107 UPROPERTY()
108 TArray<FPendingToastWidgetEntry> PendingToastWidgets;
109
110protected:
111 int32 ExitingToastCount = 0;
112};
Definition StageEventListenableUserWidget.h:17
Definition ToastRootHUDWidget.h:46
Definition ToastWidgetBase.h:20
FDT_ToastMessageTable ToastData
Definition ToastWidgetBase.h:67
Definition ToastRootHUDWidget.h:19
Definition DT_ToastMessageTable.h:10
Definition ToastRootHUDWidget.h:33