File size: 1,774 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 55 56 57 58 59 60 61 | // Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Components/Widget.h"
#include "UI/Weapons/SCircumferenceMarkerWidget.h"
#include "CircumferenceMarkerWidget.generated.h"
class SWidget;
class UObject;
struct FFrame;
UCLASS()
class UCircumferenceMarkerWidget : public UWidget
{
GENERATED_BODY()
public:
UCircumferenceMarkerWidget(const FObjectInitializer& ObjectInitializer);
//~UWidget interface
public:
virtual void SynchronizeProperties() override;
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 list of positions/orientations to draw the markers at. */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Appearance)
TArray<FCircumferenceMarkerEntry> MarkerList;
/** The radius of the circle. */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Appearance, meta=(ClampMin=0.0))
float Radius = 48.0f;
/** The marker image to place around the circle. */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Appearance)
FSlateBrush MarkerImage;
/** Whether reticle corner images are placed outside the spread radius */
//@TODO: Make this a 0-1 float alignment instead (e.g., inside/on/outside the radius)?
UPROPERTY(EditAnywhere, Category=Corner)
uint8 bReticleCornerOutsideSpreadRadius : 1;
public:
/** Sets the radius of the circle. */
UFUNCTION(BlueprintCallable, Category = "Appearance")
void SetRadius(float InRadius);
private:
/** Internal slate widget representing the actual marker visuals */
TSharedPtr<SCircumferenceMarkerWidget> MyMarkerWidget;
};
|