LEAP Documentation 40220
Documentation for the LEAP project
DeathInfoWidget.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2022. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "DeathInfoWidget.generated.h"
8
12UCLASS()
13class PROJECTX_API UDeathInfoWidget : public UAdvancedUserWidget
14{
15 GENERATED_BODY()
16
17public:
18 FORCEINLINE virtual void ResetState() { bWasShown = false; }
19 UFUNCTION(BlueprintPure, Category="Widget State")
20 FORCEINLINE bool GetWasShown() const { return bWasShown;}
21
22protected:
23 virtual void OnWidgetVisible_Implementation(const UObject* ContextObject = nullptr) override;
24
25private:
26 //Because this widget lives in the GameViewport, it's not recycled on HUD re-creations. This bool keeps track of its state and it is toggled to true when the widget is Open for the first time, and it can be reset externally through ResetState();
27 bool bWasShown = false;
28};
Definition: AdvancedUserWidget.h:30
Definition: DeathInfoWidget.h:14
virtual FORCEINLINE void ResetState()
Definition: DeathInfoWidget.h:18