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

58 lines
1.8 KiB
C
Raw Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Components/Widget.h"
2022-09-13 07:18:28 +00:00
#include "Containers/Map.h"
2022-05-23 18:41:30 +00:00
#include "GameplayTagContainer.h"
2022-09-13 07:18:28 +00:00
#include "Styling/SlateBrush.h"
#include "Templates/SharedPointer.h"
#include "UObject/UObjectGlobals.h"
2022-05-23 18:41:30 +00:00
#include "HitMarkerConfirmationWidget.generated.h"
2022-09-13 07:18:28 +00:00
class SHitMarkerConfirmationWidget;
class SWidget;
class UObject;
struct FGameplayTag;
2022-05-23 18:41:30 +00:00
UCLASS()
class UHitMarkerConfirmationWidget : public UWidget
{
GENERATED_BODY()
public:
UHitMarkerConfirmationWidget(const FObjectInitializer& ObjectInitializer);
//~UWidget interface
protected:
virtual TSharedRef<SWidget> RebuildWidget() override;
//~End of UWidget interface
//~UVisual interface
public:
virtual void ReleaseSlateResources(bool bReleaseChildren) override;
//~End of UVisual interface
public:
/** The duration (in seconds) to display hit notifies (they fade to transparent over this time) */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Appearance, meta=(ClampMin=0.0, ForceUnits=s))
float HitNotifyDuration = 0.4f;
/** The marker image to draw for individual hit markers. */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Appearance)
FSlateBrush PerHitMarkerImage;
/** Map from zone tag (e.g., weak spot) to override marker images for individual location hits. */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Appearance)
TMap<FGameplayTag, FSlateBrush> PerHitMarkerZoneOverrideImages;
/** The marker image to draw if there are any hits at all. */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Appearance)
FSlateBrush AnyHitsMarkerImage;
private:
/** Internal slate widget representing the actual marker visuals */
TSharedPtr<SHitMarkerConfirmationWidget> MyMarkerWidget;
};