File size: 1,676 Bytes
7fd553e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | // Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Components/Widget.h"
#include "GameplayTagContainer.h"
#include "HitMarkerConfirmationWidget.generated.h"
class SHitMarkerConfirmationWidget;
class SWidget;
class UObject;
struct FGameplayTag;
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;
};
|