From af66792d048f18f51b43b394c751e54d619b2ec6 Mon Sep 17 00:00:00 2001 From: Jamie Greunbaum Date: Tue, 30 May 2023 01:02:05 -0400 Subject: [PATCH] Open and close delegates changed to multicast delegates, since we need to use these in multiple places now. --- .../CommonLoadingScreen/Private/LoadingScreenWidget.cpp | 8 ++------ Source/CommonLoadingScreen/Public/LoadingScreenWidget.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Source/CommonLoadingScreen/Private/LoadingScreenWidget.cpp b/Source/CommonLoadingScreen/Private/LoadingScreenWidget.cpp index 55003ef..264b0c9 100644 --- a/Source/CommonLoadingScreen/Private/LoadingScreenWidget.cpp +++ b/Source/CommonLoadingScreen/Private/LoadingScreenWidget.cpp @@ -14,9 +14,7 @@ void ULoadingScreenWidget::NativePreConstruct() void ULoadingScreenWidget::LoadScreenOpened() { this->UnbindAllFromAnimationFinished(this->Fade); -#if !WITH_EDITOR - this->OnLoadScreenOpened.ExecuteIfBound(); -#endif + this->OnLoadScreenOpened.Broadcast(); } void ULoadingScreenWidget::BeginFadeOut_Implementation() @@ -30,7 +28,5 @@ void ULoadingScreenWidget::BeginFadeOut_Implementation() void ULoadingScreenWidget::LoadScreenClosed() { this->UnbindAllFromAnimationFinished(this->Fade); -#if !WITH_EDITOR - this->OnLoadScreenClosed.ExecuteIfBound(); -#endif + this->OnLoadScreenClosed.Broadcast(); } diff --git a/Source/CommonLoadingScreen/Public/LoadingScreenWidget.h b/Source/CommonLoadingScreen/Public/LoadingScreenWidget.h index 98a57bf..1f9a060 100644 --- a/Source/CommonLoadingScreen/Public/LoadingScreenWidget.h +++ b/Source/CommonLoadingScreen/Public/LoadingScreenWidget.h @@ -28,7 +28,7 @@ public: UFUNCTION(BlueprintNativeEvent) void BeginFadeOut(); - DECLARE_DELEGATE(FOnLoadScreenEvent) + DECLARE_MULTICAST_DELEGATE(FOnLoadScreenEvent) FOnLoadScreenEvent OnLoadScreenOpened; FOnLoadScreenEvent OnLoadScreenClosed;