LEAP Documentation 40220
Documentation for the LEAP project
HUDBasicUserWidget.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2018. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "BasicUserWidget.h"
7#include "HUDBasicUserWidget.generated.h"
8
12UCLASS()
13class PROJECTX_API UHUDBasicUserWidget : public UBasicUserWidget
14{
15 GENERATED_BODY()
16
17public:
18 virtual bool ToggleHUDWidget(bool bToggle);
19 UFUNCTION(BlueprintCallable, Category = "HUD Widget")
20 bool CanBeHidden() const;
21 UFUNCTION(BlueprintCallable, Category = "HUD Widget")
22 FORCEINLINE bool CanBeDestroyed() const { return bCanBeDestroyed; }
23
24 UFUNCTION(BlueprintCallable, Category = "HUD Widget", meta = (WorldContext = "WorldContextObject", CallableWithoutWorldContext))
25 void AddHUDBasicUserWidgetToWidgetList();
26 UFUNCTION(BlueprintCallable, Category = "HUD Widget", meta = (WorldContext = "WorldContextObject", CallableWithoutWorldContext))
27 void RemoveHUDBasicUserWidgetFromWidgetList();
28 UFUNCTION(BlueprintImplementableEvent)
29 void AddChildWidget(UUserWidget* ChildWidget);
30
31protected:
32 //Can this HUD Widget be destroyed?
33 UPROPERTY(EditDefaultsOnly, Category = "HUD Widget")
34 bool bCanBeDestroyed = true;
35 //Can this HUD Widget be hidden at all?
36 UPROPERTY(EditDefaultsOnly, Category = "HUD Widget")
37 bool bCanBeHidden = true;
38 //Should this HUD Widget use a visibility count based on Show/Hide requests to decide if it can be hidden or shown?
39 UPROPERTY(EditDefaultsOnly, Category = "HUD Widget")
40 bool bUseVisibilityCount = false;
41
42private:
43 //Track of Show / Hide requests
44 int VisibilityCount = 0;
45};
Definition: BasicUserWidget.h:14
Definition: HUDBasicUserWidget.h:14