Add an AfterClose event to menus

This commit is contained in:
Steve Streeting 2024-10-23 15:00:25 +01:00
parent 407e7e750b
commit 88b5a5dcaf
2 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,7 @@ void UMenuBase::Close(bool bWasCancel)
RemoveFromParent();
PreviousFocusWidget.Reset();
}
AfterClosed.Broadcast(this, bWasCancel);
}
void UMenuBase::AddedToStack(UMenuStack* Parent)

View File

@ -21,8 +21,13 @@ class STEVESUEHELPERS_API UMenuBase : public UFocusablePanel
{
GENERATED_BODY()
public:
/// Raised just as the menu is closing
UPROPERTY(BlueprintAssignable)
FOnMenuClosed OnClosed;
/// Raised just after the menu has closed
UPROPERTY(BlueprintAssignable)
FOnMenuClosed AfterClosed;
protected:
UPROPERTY(BlueprintReadOnly)