Download LyraStarterGame/Source/LyraGame/UI/Weapons/SHitMarkerConfirmationWidget.h from Alexhas2/unitysamples: direct link, hf CLI and curl.
- Browser
- Download file 2.79 kB
-
https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/UI/Weapons/SHitMarkerConfirmationWidget.h
- Command line
-
hf download hf://datasets/Alexhas2/unitysamples/LyraStarterGame/Source/LyraGame/UI/Weapons/SHitMarkerConfirmationWidget.h
-
curl -L -o SHitMarkerConfirmationWidget.h https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/UI/Weapons/SHitMarkerConfirmationWidget.h
2.79 kB
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| class FPaintArgs; | |
| class FSlateRect; | |
| class FSlateWindowElementList; | |
| class FWidgetStyle; | |
| struct FGameplayTag; | |
| struct FGeometry; | |
| struct FSlateBrush; | |
| class SHitMarkerConfirmationWidget : public SLeafWidget | |
| { | |
| SLATE_BEGIN_ARGS(SHitMarkerConfirmationWidget) | |
| : _PerHitMarkerImage(FCoreStyle::Get().GetBrush("Throbber.CircleChunk")) | |
| , _AnyHitsMarkerImage(nullptr) | |
| , _HitNotifyDuration(0.4f) | |
| { | |
| } | |
| /** The marker image to draw for individual hit markers. */ | |
| SLATE_ARGUMENT(const FSlateBrush*, PerHitMarkerImage) | |
| /** The marker image to draw if there are any hits at all. */ | |
| SLATE_ARGUMENT(const FSlateBrush*, AnyHitsMarkerImage) | |
| /** The duration (in seconds) to display hit notifies (they fade to transparent over this time) */ | |
| SLATE_ATTRIBUTE(float, HitNotifyDuration) | |
| /** The color and opacity of the marker */ | |
| SLATE_ATTRIBUTE(FSlateColor, ColorAndOpacity) | |
| SLATE_END_ARGS() | |
| public: | |
| void Construct(const FArguments& InArgs, const FLocalPlayerContext& InContext, const TMap<FGameplayTag, FSlateBrush>& ZoneOverrideImages); | |
| SHitMarkerConfirmationWidget(); | |
| //~SWidget interface | |
| virtual int32 OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled) const override; | |
| virtual void Tick(const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override; | |
| virtual FVector2D ComputeDesiredSize(float) const override; | |
| virtual bool ComputeVolatility() const override { return true; } | |
| //~End of SWidget interface | |
| private: | |
| /** The marker image to draw for individual hit markers. */ | |
| const FSlateBrush* PerHitMarkerImage = nullptr; | |
| /** Map from zone tag (e.g., weak spot) to override marker images. */ | |
| TMap<FGameplayTag, FSlateBrush> PerHitMarkerZoneOverrideImages; | |
| /** The marker image to draw if there are any hits at all. */ | |
| const FSlateBrush* AnyHitsMarkerImage = nullptr; | |
| /** The opacity for the hit markers */ | |
| float HitNotifyOpacity = 0.0f; | |
| /** The duration (in seconds) to display hit notifies (they fade to transparent over this time) */ | |
| float HitNotifyDuration = 0.4f; | |
| /** Color and opacity of the markers */ | |
| TAttribute<FSlateColor> ColorAndOpacity; | |
| bool bColorAndOpacitySet; | |
| /** Player context for the owning HUD */ | |
| FLocalPlayerContext MyContext; | |
| }; | |