RealtimeStyleTransferRuntime/Source/LyraGame/UI/Weapons/LyraWeaponUserInterface.h

37 lines
928 B
C
Raw Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CommonUserWidget.h"
2022-09-13 07:18:28 +00:00
#include "UObject/ObjectPtr.h"
#include "UObject/UObjectGlobals.h"
2022-05-23 18:41:30 +00:00
#include "LyraWeaponUserInterface.generated.h"
class ULyraWeaponInstance;
2022-09-13 07:18:28 +00:00
class UObject;
struct FGeometry;
2022-05-23 18:41:30 +00:00
UCLASS()
class ULyraWeaponUserInterface : public UCommonUserWidget
{
GENERATED_BODY()
public:
ULyraWeaponUserInterface(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
virtual void NativeConstruct() override;
virtual void NativeDestruct() override;
virtual void NativeTick(const FGeometry& MyGeometry, float InDeltaTime) override;
UFUNCTION(BlueprintImplementableEvent)
void OnWeaponChanged(ULyraWeaponInstance* OldWeapon, ULyraWeaponInstance* NewWeapon);
private:
void RebuildWidgetFromWeapon();
private:
UPROPERTY(Transient)
TObjectPtr<ULyraWeaponInstance> CurrentInstance;
};