AuraHUD
This commit is contained in:
parent
d87e2ee9dd
commit
a6f598782d
Binary file not shown.
BIN
Content/Blueprints/UI/HUD/BP_AuraHUD.uasset
Normal file
BIN
Content/Blueprints/UI/HUD/BP_AuraHUD.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
13
Source/Aura/Private/UI/HUD/AuraHUD.cpp
Normal file
13
Source/Aura/Private/UI/HUD/AuraHUD.cpp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright; GhostPacket Games
|
||||||
|
|
||||||
|
#include "UI/HUD/AuraHUD.h"
|
||||||
|
|
||||||
|
#include "UI/Widgets/AuraUserWidget.h"
|
||||||
|
|
||||||
|
void AAuraHUD::BeginPlay()
|
||||||
|
{
|
||||||
|
Super::BeginPlay();
|
||||||
|
|
||||||
|
UUserWidget *Widget = CreateWidget<UUserWidget>(GetWorld(), OverlayWidgetClass);
|
||||||
|
Widget->AddToViewport ();
|
||||||
|
}
|
26
Source/Aura/Public/UI/HUD/AuraHUD.h
Normal file
26
Source/Aura/Public/UI/HUD/AuraHUD.h
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
// Copyright; GhostPacket Games
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "GameFramework/HUD.h"
|
||||||
|
#include "AuraHUD.generated.h"
|
||||||
|
|
||||||
|
class UAuraUserWidget;
|
||||||
|
|
||||||
|
UCLASS()
|
||||||
|
class AURA_API AAuraHUD : public AHUD
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
UPROPERTY ()
|
||||||
|
TObjectPtr<UAuraUserWidget> OverlayWidget;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
UPROPERTY(EditAnywhere)
|
||||||
|
TSubclassOf<UAuraUserWidget> OverlayWidgetClass;
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user