Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
UToastRootHUDWidget 클래스 참조

#include <ToastRootHUDWidget.h>

UToastRootHUDWidget에 대한 상속 다이어그램 :
Inheritance graph
UToastRootHUDWidget에 대한 협력 다이어그램:
Collaboration graph

Public 멤버 함수

bool ShowToastByID (const int32 ToastID, const bool bDiscardPendingToasts=false)
 
bool ShowToastByRowName (const FName ToastRowName, const bool bDiscardPendingToasts=false)
 
void ShowToast (const FDT_ToastMessageTable &InToastData, const bool bDiscardPendingToasts=false)
 
FORCEINLINE void SetToastDataTable (UDataTable *InToastDataTable)
 
FORCEINLINE UDataTable * GetToastDataTable () const
 
- UUserWidgetBase(으)로부터 상속된 Public 멤버 함수
UUserPresenterBase * RequestPresenter ()
 
UUserPresenterBase * FindPresenter () const
 
void ReleasePresenter ()
 
virtual void BindPresenter_Implementation (UObject *Presenter) override
 
virtual void UnbindPresenter_Implementation (UObject *Presenter) override
 
virtual void SetAbilitySystemComponent (AActor *InOwner)
 
virtual void ResetAbilitySystemComponent (AActor *InOwner)
 
virtual UAbilitySystemComponent * GetAbilitySystemComponent () const override
 
virtual void OnPushedToLayer ()
 
virtual void OnPoppedFromLayer ()
 
virtual void OnActivated ()
 
virtual void OnDeactivated ()
 
void Activate ()
 
void Deactivate ()
 
bool CanBePushedToLayer () const
 
FORCEINLINE UWaitForWidgetActivation * GetActivationHandle ()
 
FORCEINLINE TSubclassOf< UUserPresenterBase > GetWidgetPresenterClass () const
 
FORCEINLINE FGameplayTag GetLayerTag () const
 
FORCEINLINE void SetLayerTag (const FGameplayTag InTag)
 
FORCEINLINE bool IsPrimary () const
 
FORCEINLINE void SetPrimary (const bool InPrimary)
 
FORCEINLINE EWidgetState GetWidgetState () const
 
FORCEINLINE void SetWidgetState (const EWidgetState InState)
 
FORCEINLINE bool HasAppearanceAnim () const
 
FORCEINLINE bool HasDisappearanceAnim () const
 
- IWidgetViewInterface(으)로부터 상속된 Public 멤버 함수
void BindPresenter (UObject *Presenter)
 
void UnbindPresenter (UObject *Presenter)
 
- IStageEventBehaviorInterface(으)로부터 상속된 Public 멤버 함수
void HandleStageEvent (const FStageEventMessage &Message, const FInstancedStruct &ListenerContext)
 
bool ShouldReceiveStageEvent (const FStageEventMessage &Message, const FInstancedStruct &ListenerContext)
 
virtual void HandleStageEvent_Implementation (const FStageEventMessage &Message, const FInstancedStruct &ListenerContext)
 
virtual bool ShouldReceiveStageEvent_Implementation (const FStageEventMessage &Message, const FInstancedStruct &ListenerContext)
 

Protected 멤버 함수

virtual void NativeDestruct () override
 
int32 FindActiveToastIndexByGroupID (const int32 GroupID) const
 
int32 FindActiveToastIndex (const UToastWidgetBase *ToastWidget) const
 
void RequestOldestToastExit ()
 
void ProcessPendingToastQueue ()
 
UDataTable * ResolveToastDataTable ()
 
void RequestToastExit (UToastWidgetBase *ToastWidget)
 
void RemoveToastWidget (UToastWidgetBase *ToastWidget)
 
void EnqueueToast (const FDT_ToastMessageTable &InToastData)
 
bool TryShowNextToastInGroup (UToastWidgetBase *ToastWidget)
 
void ShowToastInternal (const FDT_ToastMessageTable &InToastData)
 
bool TryUpdateActiveToastByGroup (const FDT_ToastMessageTable &InToastData)
 
UToastWidgetBase * CreateToastWidget (const FDT_ToastMessageTable &InToastData)
 
void StartToastDurationTimer (UToastWidgetBase *ToastWidget, const float ToastDuration)
 
void AddToastWidget (UToastWidgetBase *ToastWidget, const FDT_ToastMessageTable &InToastData)
 
const FDT_ToastMessageTable * FindNextToastRowInGroup (const FDT_ToastMessageTable &CurrentToastData)
 
FORCEINLINE bool CanAddToastWidget () const
 
void OnToastRequested (const FDT_ToastMessageTable &InToastData)
 
- UUserWidgetBase(으)로부터 상속된 Protected 멤버 함수
virtual void OnWidgetStateChanged (EWidgetState InState)
 
virtual void NativeConstruct () override
 
virtual void OnWidgetActivated ()
 
virtual void OnWidgetDeactivated ()
 
void OnPushedToLayer_Internal ()
 
void OnPoppedFromLayer_Internal ()
 
void OnActivated_Internal ()
 
void OnDeactivated_Internal ()
 

Protected 속성

TSubclassOf< UToastWidgetBase > ToastWidgetClass
 
int32 MaxStackCount = 3
 
TObjectPtr< UDataTable > CachedToastDataTable
 
TObjectPtr< UStackBox > ToastMessageStack
 
TArray< FActiveToastWidgetEntry > ActiveToastWidgets
 
TArray< FPendingToastWidgetEntry > PendingToastWidgets
 
int32 ExitingToastCount = 0
 
- UUserWidgetBase(으)로부터 상속된 Protected 속성
TSubclassOf< UUserPresenterBase > PresenterClass
 
EWidgetState WidgetState
 
TObjectPtr< UAbilitySystemComponent > ASC
 
FGameplayTag LayerTag
 
bool bPrimary = false
 
TObjectPtr< UWidgetAnimation > AppearanceAnim
 
TObjectPtr< UWidgetAnimation > DisappearanceAnim
 

멤버 함수 문서화

◆ AddToastWidget()

void UToastRootHUDWidget::AddToastWidget ( UToastWidgetBase *  ToastWidget,
const FDT_ToastMessageTable &  InToastData 
)
protected
211{
212 if (IsValid(ToastWidget) == false)
213 {
214 return;
215 }
216
217 if (IsValid(ToastMessageStack) == false)
218 {
219 LOG_ERROR(LogCK, "%s 바인딩이 없습니다.", NAMEOF_VAR(ToastMessageStack));
220 return;
221 }
222
223 ToastMessageStack->AddChild(ToastWidget);
224
225 FActiveToastWidgetEntry ActiveToastWidget;
226 ActiveToastWidget.ToastWidget = ToastWidget;
227 ActiveToastWidget.GroupID = InToastData.Group_ID;
228 ActiveToastWidgets.Add(ActiveToastWidget);
229
230 ToastWidget->PlayEnterToastAnimation();
231 StartToastDurationTimer(ToastWidget, InToastData.Toast_Duration);
232}
#define LOG_ERROR(Category, Format,...)
Definition CK_UE.h:41
#define NAMEOF_VAR(Expr)
Definition CK_UE.h:35
TArray< FActiveToastWidgetEntry > ActiveToastWidgets
Definition ToastRootHUDWidget.h:116
TObjectPtr< UStackBox > ToastMessageStack
Definition ToastRootHUDWidget.h:113
void StartToastDurationTimer(UToastWidgetBase *ToastWidget, const float ToastDuration)
Definition ToastRootHUDWidget.cpp:277
void PlayEnterToastAnimation()
Definition ToastWidgetBase.cpp:115
Definition ToastRootHUDWidget.h:18
int32 GroupID
Definition ToastRootHUDWidget.h:26
TObjectPtr< UToastWidgetBase > ToastWidget
Definition ToastRootHUDWidget.h:23
float Toast_Duration
Definition DT_ToastMessageTable.h:47
int32 Group_ID
Definition DT_ToastMessageTable.h:26

다음을 참조함 : ActiveToastWidgets, FDT_ToastMessageTable::Group_ID, FActiveToastWidgetEntry::GroupID, LOG_ERROR, NAMEOF_VAR, UToastWidgetBase::PlayEnterToastAnimation(), StartToastDurationTimer(), FDT_ToastMessageTable::Toast_Duration, ToastMessageStack, FActiveToastWidgetEntry::ToastWidget.

다음에 의해서 참조됨 : ShowToastInternal().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ CanAddToastWidget()

FORCEINLINE bool UToastRootHUDWidget::CanAddToastWidget ( ) const
inlineprotected
93 {
94 const int32 EffectiveMaxStackCount = FMath::Max(1, MaxStackCount);
95 return ActiveToastWidgets.Num() + ExitingToastCount < EffectiveMaxStackCount;
96 }
int32 MaxStackCount
Definition ToastRootHUDWidget.h:107
int32 ExitingToastCount
Definition ToastRootHUDWidget.h:122

다음에 의해서 참조됨 : ProcessPendingToastQueue(), ShowToast(), ShowToastInternal().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ CreateToastWidget()

UToastWidgetBase * UToastRootHUDWidget::CreateToastWidget ( const FDT_ToastMessageTable &  InToastData)
protected
185{
186 if (IsValid(ToastMessageStack) == false)
187 {
188 LOG_ERROR(LogCK, "%s 바인딩이 없습니다.", NAMEOF_VAR(ToastMessageStack));
189 return nullptr;
190 }
191
192 if (ToastWidgetClass == nullptr)
193 {
194 LOG_ERROR(LogCK, "%s 설정이 없습니다.", NAMEOF_VAR(ToastWidgetClass));
195 return nullptr;
196 }
197
198 UToastWidgetBase* ToastWidget = CreateWidget<UToastWidgetBase>(GetOwningPlayer(), ToastWidgetClass);
199 if (IsValid(ToastWidget) == false)
200 {
201 LOG_ERROR(LogCK, "ToastWidget 생성에 실패했습니다.");
202 return nullptr;
203 }
204
205 ToastWidget->SetupToast(InToastData);
206 return ToastWidget;
207}
TSubclassOf< UToastWidgetBase > ToastWidgetClass
Definition ToastRootHUDWidget.h:104
Definition ToastWidgetBase.h:20
void SetupToast(const FDT_ToastMessageTable &InToastData)
Definition ToastWidgetBase.cpp:15

다음을 참조함 : LOG_ERROR, NAMEOF_VAR, UToastWidgetBase::SetupToast(), ToastMessageStack, ToastWidgetClass.

다음에 의해서 참조됨 : ShowToastInternal().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ EnqueueToast()

void UToastRootHUDWidget::EnqueueToast ( const FDT_ToastMessageTable &  InToastData)
protected
94{
95 FPendingToastWidgetEntry PendingToastWidget;
96 PendingToastWidget.ToastData = InToastData;
97 PendingToastWidgets.Add(PendingToastWidget);
98}
TArray< FPendingToastWidgetEntry > PendingToastWidgets
Definition ToastRootHUDWidget.h:119
Definition ToastRootHUDWidget.h:32
FDT_ToastMessageTable ToastData
Definition ToastRootHUDWidget.h:37

다음을 참조함 : PendingToastWidgets, FPendingToastWidgetEntry::ToastData.

다음에 의해서 참조됨 : ShowToast(), ShowToastInternal().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ FindActiveToastIndex()

int32 UToastRootHUDWidget::FindActiveToastIndex ( const UToastWidgetBase *  ToastWidget) const
protected
467{
468 if (ToastWidget == nullptr)
469 {
470 return INDEX_NONE;
471 }
472
473 return ActiveToastWidgets.IndexOfByPredicate([&ToastWidget](auto ActiveToastWidget)
474 {
475 return ActiveToastWidget.ToastWidget == ToastWidget;
476 });
477}

다음을 참조함 : ActiveToastWidgets.

다음에 의해서 참조됨 : RequestToastExit(), StartToastDurationTimer(), TryShowNextToastInGroup().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ FindActiveToastIndexByGroupID()

int32 UToastRootHUDWidget::FindActiveToastIndexByGroupID ( const int32  GroupID) const
protected
481{
482 return ActiveToastWidgets.IndexOfByPredicate([GroupID](const FActiveToastWidgetEntry& ActiveToastWidget)
483 {
484 return ActiveToastWidget.GroupID == GroupID;
485 });
486}

다음을 참조함 : ActiveToastWidgets, FActiveToastWidgetEntry::GroupID.

다음에 의해서 참조됨 : TryUpdateActiveToastByGroup().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ FindNextToastRowInGroup()

const FDT_ToastMessageTable * UToastRootHUDWidget::FindNextToastRowInGroup ( const FDT_ToastMessageTable &  CurrentToastData)
protected
432{
433 const UDataTable* ToastDataTable = ResolveToastDataTable();
434
435 if (IsValid(ToastDataTable) == false)
436 {
437 return nullptr;
438 }
439
440 const TArray<FName> RowNames = ToastDataTable->GetRowNames();
441 const FName CurrentRowName = FName(*FString::FromInt(CurrentToastData.Toast_ID));
442 const int32 CurrentRowIndex = RowNames.IndexOfByKey(CurrentRowName);
443
444 if (CurrentRowIndex == INDEX_NONE || RowNames.IsValidIndex(CurrentRowIndex + 1) == false)
445 {
446 return nullptr;
447 }
448
449 const FString ContextString = FString::Printf(TEXT("%s::FindNextToastRowInGroup"), TEXT("UToastRootHUDWidget"));
450 const FDT_ToastMessageTable* NextToastData = ToastDataTable->FindRow<FDT_ToastMessageTable>(RowNames[CurrentRowIndex + 1], *ContextString);
451
452 if (NextToastData == nullptr)
453 {
454 return nullptr;
455 }
456
457 if (NextToastData->Group_ID != CurrentToastData.Group_ID)
458 {
459 return nullptr;
460 }
461
462 return NextToastData;
463}
UDataTable * ResolveToastDataTable()
Definition ToastRootHUDWidget.cpp:129
Definition DT_ToastMessageTable.h:10
int32 Toast_ID
Definition DT_ToastMessageTable.h:23

다음을 참조함 : FDT_ToastMessageTable::Group_ID, ResolveToastDataTable(), FDT_ToastMessageTable::Toast_ID.

다음에 의해서 참조됨 : TryShowNextToastInGroup().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GetToastDataTable()

FORCEINLINE UDataTable * UToastRootHUDWidget::GetToastDataTable ( ) const
inline
67 {
69 }
TObjectPtr< UDataTable > CachedToastDataTable
Definition ToastRootHUDWidget.h:110

◆ NativeDestruct()

void UToastRootHUDWidget::NativeDestruct ( )
overrideprotectedvirtual

UUserWidgetBase(으)로부터 재구현되었습니다.

142{
143 UWorld* World = GetWorld();
144 check(World);
145
146 for (FActiveToastWidgetEntry& ActiveToastWidget : ActiveToastWidgets)
147 {
148 World->GetTimerManager().ClearTimer(ActiveToastWidget.DurationTimerHandle);
149 }
150
151 ActiveToastWidgets.Empty();
152 PendingToastWidgets.Empty();
154 Super::NativeDestruct();
155}

다음을 참조함 : ActiveToastWidgets, ExitingToastCount, PendingToastWidgets.

◆ OnToastRequested()

void UToastRootHUDWidget::OnToastRequested ( const FDT_ToastMessageTable &  InToastData)
protected

◆ ProcessPendingToastQueue()

void UToastRootHUDWidget::ProcessPendingToastQueue ( )
protected
102{
103 while (PendingToastWidgets.IsEmpty() == false)
104 {
105 const FDT_ToastMessageTable ToastData = PendingToastWidgets[0].ToastData;
106
107 if (TryUpdateActiveToastByGroup(ToastData))
108 {
109 PendingToastWidgets.RemoveAt(0);
110 continue;
111 }
112
113 if (CanAddToastWidget() == false)
114 {
115 if (ExitingToastCount <= 0)
116 {
118 }
119
120 return;
121 }
122
123 PendingToastWidgets.RemoveAt(0);
124 ShowToastInternal(ToastData);
125 }
126}
void RequestOldestToastExit()
Definition ToastRootHUDWidget.cpp:266
bool TryUpdateActiveToastByGroup(const FDT_ToastMessageTable &InToastData)
Definition ToastRootHUDWidget.cpp:235
FORCEINLINE bool CanAddToastWidget() const
Definition ToastRootHUDWidget.h:92
void ShowToastInternal(const FDT_ToastMessageTable &InToastData)
Definition ToastRootHUDWidget.cpp:158

다음을 참조함 : CanAddToastWidget(), ExitingToastCount, PendingToastWidgets, RequestOldestToastExit(), ShowToastInternal(), TryUpdateActiveToastByGroup().

다음에 의해서 참조됨 : RemoveToastWidget(), RequestToastExit().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RemoveToastWidget()

void UToastRootHUDWidget::RemoveToastWidget ( UToastWidgetBase *  ToastWidget)
protected
391{
392 if (IsValid(ToastWidget))
393 {
394 ToastWidget->RemoveFromParent();
395 }
396
397 ExitingToastCount = FMath::Max(0, ExitingToastCount - 1);
399}
void ProcessPendingToastQueue()
Definition ToastRootHUDWidget.cpp:101

다음을 참조함 : ExitingToastCount, ProcessPendingToastQueue().

다음에 의해서 참조됨 : RequestToastExit().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RequestOldestToastExit()

void UToastRootHUDWidget::RequestOldestToastExit ( )
protected
267{
268 if (ActiveToastWidgets.IsEmpty())
269 {
270 return;
271 }
272
273 RequestToastExit(ActiveToastWidgets[0].ToastWidget);
274}
void RequestToastExit(UToastWidgetBase *ToastWidget)
Definition ToastRootHUDWidget.cpp:334

다음을 참조함 : ActiveToastWidgets, RequestToastExit().

다음에 의해서 참조됨 : ProcessPendingToastQueue(), ShowToast(), ShowToastInternal().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RequestToastExit()

void UToastRootHUDWidget::RequestToastExit ( UToastWidgetBase *  ToastWidget)
protected
335{
336 const int32 ActiveToastIndex = FindActiveToastIndex(ToastWidget);
337
338 if (ActiveToastIndex == INDEX_NONE)
339 {
340 return;
341 }
342
343 const UWorld* World = GetWorld();
344
345 if (World)
346 {
347 World->GetTimerManager().ClearTimer(ActiveToastWidgets[ActiveToastIndex].DurationTimerHandle);
348 }
349
350 UToastWidgetBase* ExitingToastWidget = ActiveToastWidgets[ActiveToastIndex].ToastWidget;
351 ActiveToastWidgets.RemoveAt(ActiveToastIndex);
352
353 if (IsValid(ExitingToastWidget) == false)
354 {
356 return;
357 }
358
360 ExitingToastWidget->PlayExitToastAnimation();
361
362 const float ExitDuration = FMath::Max(0.0f, ExitingToastWidget->GetExitAnimationDuration());
363
364 if (World == nullptr || ExitDuration < KINDA_SMALL_NUMBER)
365 {
366 RemoveToastWidget(ExitingToastWidget);
367 return;
368 }
369
370 TWeakObjectPtr<UToastRootHUDWidget> WeakThis(this);
371 TWeakObjectPtr<UToastWidgetBase> WeakToastWidget(ExitingToastWidget);
372
373 FTimerDelegate TimerDelegate;
374
375 TimerDelegate.BindLambda([WeakThis, WeakToastWidget]()
376 {
377 if (WeakThis.IsValid() == false || WeakToastWidget.IsValid() == false)
378 {
379 return;
380 }
381
382 WeakThis->RemoveToastWidget(WeakToastWidget.Get());
383 });
384
385 FTimerHandle RemoveTimerHandle;
386 World->GetTimerManager().SetTimer(RemoveTimerHandle, TimerDelegate, ExitDuration, false);
387}
void RemoveToastWidget(UToastWidgetBase *ToastWidget)
Definition ToastRootHUDWidget.cpp:390
int32 FindActiveToastIndex(const UToastWidgetBase *ToastWidget) const
Definition ToastRootHUDWidget.cpp:466
float GetExitAnimationDuration() const
Definition ToastWidgetBase.cpp:154
void PlayExitToastAnimation()
Definition ToastWidgetBase.cpp:128

다음을 참조함 : ActiveToastWidgets, ExitingToastCount, FindActiveToastIndex(), UToastWidgetBase::GetExitAnimationDuration(), UToastWidgetBase::PlayExitToastAnimation(), ProcessPendingToastQueue(), RemoveToastWidget().

다음에 의해서 참조됨 : RequestOldestToastExit(), StartToastDurationTimer().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ ResolveToastDataTable()

UDataTable * UToastRootHUDWidget::ResolveToastDataTable ( )
protected
130{
131 if (IsValid(CachedToastDataTable))
132 {
134 }
135
136 CachedToastDataTable = GetEnvironmentAssetByKey<UDataTable>("ToastMessageData");
138}

다음을 참조함 : CachedToastDataTable.

다음에 의해서 참조됨 : FindNextToastRowInGroup(), ShowToastByRowName().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ SetToastDataTable()

FORCEINLINE void UToastRootHUDWidget::SetToastDataTable ( UDataTable *  InToastDataTable)
inline
61 {
62 CachedToastDataTable = InToastDataTable;
63 }

◆ ShowToast()

void UToastRootHUDWidget::ShowToast ( const FDT_ToastMessageTable &  InToastData,
const bool  bDiscardPendingToasts = false 
)
67{
68 if (bDiscardPendingToasts)
69 {
70 PendingToastWidgets.Empty();
71 }
72
73 if (TryUpdateActiveToastByGroup(InToastData))
74 {
75 return;
76 }
77
79 {
80 ShowToastInternal(InToastData);
81 return;
82 }
83
84 EnqueueToast(InToastData);
85
86 if (ExitingToastCount <= 0)
87 {
89 }
90}
void EnqueueToast(const FDT_ToastMessageTable &InToastData)
Definition ToastRootHUDWidget.cpp:93

다음을 참조함 : CanAddToastWidget(), EnqueueToast(), ExitingToastCount, PendingToastWidgets, RequestOldestToastExit(), ShowToastInternal(), TryUpdateActiveToastByGroup().

다음에 의해서 참조됨 : ShowToastByRowName().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ ShowToastByID()

bool UToastRootHUDWidget::ShowToastByID ( const int32  ToastID,
const bool  bDiscardPendingToasts = false 
)
16{
17 if (ToastID <= 0)
18 {
19 LOG_WARNING(LogCK, "유효하지 않은 ToastID입니다. ToastID: %d", ToastID);
20 return false;
21 }
22
23 if (ShowToastByRowName(FName(*FString::FromInt(ToastID)), bDiscardPendingToasts))
24 {
25 return true;
26 }
27 else
28 {
29 return false;
30 }
31}
#define LOG_WARNING(Category, Format,...)
Definition CK_UE.h:40
bool ShowToastByRowName(const FName ToastRowName, const bool bDiscardPendingToasts=false)
Definition ToastRootHUDWidget.cpp:34

다음을 참조함 : LOG_WARNING, ShowToastByRowName().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ ShowToastByRowName()

bool UToastRootHUDWidget::ShowToastByRowName ( const FName  ToastRowName,
const bool  bDiscardPendingToasts = false 
)
35{
36 if (ToastRowName.IsNone())
37 {
38 LOG_WARNING(LogCK, "ToastRowName이 비어있습니다.");
39 return false;
40 }
41
42 const UDataTable* ToastDataTable = ResolveToastDataTable();
43
44 if (IsValid(ToastDataTable) == false)
45 {
46 LOG_WARNING(LogCK, "ToastDataTable을 찾을 수 없습니다.");
47 return false;
48 }
49
50 const FString ContextString = FString::Printf(TEXT("%s::ShowToastByRowName"), TEXT("UToastRootHUDWidget"));
51 const FDT_ToastMessageTable* RowData = ToastDataTable->FindRow<FDT_ToastMessageTable>(ToastRowName, *ContextString);
52
53 if (RowData == nullptr)
54 {
55 LOG_WARNING(LogCK, "Toast row를 찾을 수 없습니다. RowName: %s", *ToastRowName.ToString());
56 return false;
57 }
58 else
59 {
60 ShowToast(*RowData, bDiscardPendingToasts);
61 return true;
62 }
63}
void ShowToast(const FDT_ToastMessageTable &InToastData, const bool bDiscardPendingToasts=false)
Definition ToastRootHUDWidget.cpp:66

다음을 참조함 : LOG_WARNING, ResolveToastDataTable(), ShowToast().

다음에 의해서 참조됨 : ShowToastByID().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ ShowToastInternal()

void UToastRootHUDWidget::ShowToastInternal ( const FDT_ToastMessageTable &  InToastData)
protected
159{
160 if (CanAddToastWidget() == false)
161 {
162 EnqueueToast(InToastData);
163
164 if (ExitingToastCount <= 0)
165 {
167 }
168
169 return;
170 }
171
172 UToastWidgetBase* ToastWidget = CreateToastWidget(InToastData);
173
174 if (IsValid(ToastWidget) == false)
175 {
176 LOG_ERROR(LogCK, "%s가 유효하지 않습니다. ", NAMEOF_VAR(ToastWidget));
177 return;
178 }
179
180 AddToastWidget(ToastWidget, InToastData);
181}
UToastWidgetBase * CreateToastWidget(const FDT_ToastMessageTable &InToastData)
Definition ToastRootHUDWidget.cpp:184
void AddToastWidget(UToastWidgetBase *ToastWidget, const FDT_ToastMessageTable &InToastData)
Definition ToastRootHUDWidget.cpp:210

다음을 참조함 : AddToastWidget(), CanAddToastWidget(), CreateToastWidget(), EnqueueToast(), ExitingToastCount, LOG_ERROR, NAMEOF_VAR, RequestOldestToastExit().

다음에 의해서 참조됨 : ProcessPendingToastQueue(), ShowToast().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ StartToastDurationTimer()

void UToastRootHUDWidget::StartToastDurationTimer ( UToastWidgetBase *  ToastWidget,
const float  ToastDuration 
)
protected
278{
279 const int32 ActiveToastIndex = FindActiveToastIndex(ToastWidget);
280
281 if (ActiveToastIndex == INDEX_NONE)
282 {
283 return;
284 }
285
286 const UWorld* World = GetWorld();
287 check(World);
288
289 World->GetTimerManager().ClearTimer(ActiveToastWidgets[ActiveToastIndex].DurationTimerHandle);
290
291 const float ValidToastDuration = FMath::Max(0.0f, ToastDuration);
292
293 if (ValidToastDuration < KINDA_SMALL_NUMBER)
294 {
295 if (TryShowNextToastInGroup(ToastWidget))
296 {
297 return;
298 }
299
300 RequestToastExit(ToastWidget);
301 return;
302 }
303
304 TWeakObjectPtr<UToastRootHUDWidget> WeakThis(this);
305 TWeakObjectPtr<UToastWidgetBase> WeakToastWidget(ToastWidget);
306
307 FTimerDelegate TimerDelegate;
308
309 TimerDelegate.BindLambda([WeakThis, WeakToastWidget]()
310 {
311 if (WeakThis.IsValid() == false || WeakToastWidget.IsValid() == false)
312 {
313 return;
314 }
315
316 if (WeakThis->TryShowNextToastInGroup(WeakToastWidget.Get()))
317 {
318 return;
319 }
320
321 WeakThis->RequestToastExit(WeakToastWidget.Get());
322 });
323
324 World->GetTimerManager().SetTimer
325 (
326 ActiveToastWidgets[ActiveToastIndex].DurationTimerHandle,
327 TimerDelegate,
328 ValidToastDuration,
329 false
330 );
331}
bool TryShowNextToastInGroup(UToastWidgetBase *ToastWidget)
Definition ToastRootHUDWidget.cpp:402

다음을 참조함 : ActiveToastWidgets, FindActiveToastIndex(), RequestToastExit(), TryShowNextToastInGroup().

다음에 의해서 참조됨 : AddToastWidget(), TryShowNextToastInGroup(), TryUpdateActiveToastByGroup().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ TryShowNextToastInGroup()

bool UToastRootHUDWidget::TryShowNextToastInGroup ( UToastWidgetBase *  ToastWidget)
protected
403{
404 const int32 ActiveToastIndex = FindActiveToastIndex(ToastWidget);
405
406 if (ActiveToastIndex == INDEX_NONE)
407 {
408 return false;
409 }
410
411 if (IsValid(ToastWidget) == false)
412 {
413 return false;
414 }
415
416 const FDT_ToastMessageTable CurrentToastData = ToastWidget->GetToastData();
417 const FDT_ToastMessageTable* NextToastData = FindNextToastRowInGroup(CurrentToastData);
418
419 if (NextToastData == nullptr)
420 {
421 return false;
422 }
423
424 ToastWidget->QueueNextToastData(*NextToastData);
425 ToastWidget->PlayPingPongToastAnimation();
426 StartToastDurationTimer(ToastWidget, NextToastData->Toast_Duration);
427 return true;
428}
const FDT_ToastMessageTable * FindNextToastRowInGroup(const FDT_ToastMessageTable &CurrentToastData)
Definition ToastRootHUDWidget.cpp:431
void QueueNextToastData(const FDT_ToastMessageTable &InToastData)
Definition ToastWidgetBase.cpp:170
FDT_ToastMessageTable GetToastData() const
Definition ToastWidgetBase.cpp:97
void PlayPingPongToastAnimation()
Definition ToastWidgetBase.cpp:141

다음을 참조함 : FindActiveToastIndex(), FindNextToastRowInGroup(), UToastWidgetBase::GetToastData(), UToastWidgetBase::PlayPingPongToastAnimation(), UToastWidgetBase::QueueNextToastData(), StartToastDurationTimer(), FDT_ToastMessageTable::Toast_Duration.

다음에 의해서 참조됨 : StartToastDurationTimer().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ TryUpdateActiveToastByGroup()

bool UToastRootHUDWidget::TryUpdateActiveToastByGroup ( const FDT_ToastMessageTable &  InToastData)
protected
236{
237 const int32 ActiveToastIndex = FindActiveToastIndexByGroupID(InToastData.Group_ID);
238
239 if (ActiveToastIndex == INDEX_NONE)
240 {
241 return false;
242 }
243
244 UToastWidgetBase* ToastWidget = ActiveToastWidgets[ActiveToastIndex].ToastWidget;
245
246 if (IsValid(ToastWidget) == false)
247 {
248 const UWorld* World = GetWorld();
249
250 if (World)
251 {
252 World->GetTimerManager().ClearTimer(ActiveToastWidgets[ActiveToastIndex].DurationTimerHandle);
253 }
254
255 ActiveToastWidgets.RemoveAt(ActiveToastIndex);
256 return false;
257 }
258
259 ToastWidget->QueueNextToastData(InToastData);
260 ToastWidget->PlayPingPongToastAnimation();
261 StartToastDurationTimer(ToastWidget, InToastData.Toast_Duration);
262 return true;
263}
int32 FindActiveToastIndexByGroupID(const int32 GroupID) const
Definition ToastRootHUDWidget.cpp:480

다음을 참조함 : ActiveToastWidgets, FindActiveToastIndexByGroupID(), FDT_ToastMessageTable::Group_ID, UToastWidgetBase::PlayPingPongToastAnimation(), UToastWidgetBase::QueueNextToastData(), StartToastDurationTimer(), FDT_ToastMessageTable::Toast_Duration.

다음에 의해서 참조됨 : ProcessPendingToastQueue(), ShowToast().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ ActiveToastWidgets

◆ CachedToastDataTable

TObjectPtr<UDataTable> UToastRootHUDWidget::CachedToastDataTable
protected

다음에 의해서 참조됨 : ResolveToastDataTable().

◆ ExitingToastCount

int32 UToastRootHUDWidget::ExitingToastCount = 0
protected

◆ MaxStackCount

int32 UToastRootHUDWidget::MaxStackCount = 3
protected

◆ PendingToastWidgets

TArray<FPendingToastWidgetEntry> UToastRootHUDWidget::PendingToastWidgets
protected

◆ ToastMessageStack

TObjectPtr<UStackBox> UToastRootHUDWidget::ToastMessageStack
protected

다음에 의해서 참조됨 : AddToastWidget(), CreateToastWidget().

◆ ToastWidgetClass

TSubclassOf<UToastWidgetBase> UToastRootHUDWidget::ToastWidgetClass
protected

다음에 의해서 참조됨 : CreateToastWidget().


이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: