#include <SHitMarkerConfirmationWidget.h>
|
| void | Construct (const FArguments &InArgs, const FLocalPlayerContext &InContext, const TMap< FGameplayTag, FSlateBrush > &ZoneOverrideImages) |
| |
| | SHitMarkerConfirmationWidget () |
| |
| 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 |
| |
| void | HitMarker (const AActor *Actor, float Damage, FName HitBone, FVector HitLocation) |
| |
◆ SHitMarkerConfirmationWidget()
| SHitMarkerConfirmationWidget::SHitMarkerConfirmationWidget |
( |
| ) |
|
◆ ComputeDesiredSize()
| FVector2D SHitMarkerConfirmationWidget::ComputeDesiredSize |
( |
float | | ) |
const |
|
overridevirtual |
50{
51 return FVector2D(100.0f, 100.0f);
52}
◆ ComputeVolatility()
| virtual bool SHitMarkerConfirmationWidget::ComputeVolatility |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ Construct()
| void SHitMarkerConfirmationWidget::Construct |
( |
const FArguments & | InArgs, |
|
|
const FLocalPlayerContext & | InContext, |
|
|
const TMap< FGameplayTag, FSlateBrush > & | ZoneOverrideImages ) |
The marker image to draw for individual hit markers. The marker image to draw if there are any hits at all. The duration (in seconds) to display hit notifies (they fade to transparent over this time)
The color and opacity of the marker
◆ HitMarker()
| void SHitMarkerConfirmationWidget::HitMarker |
( |
const AActor * | Actor, |
|
|
float | Damage, |
|
|
FName | HitBone, |
|
|
FVector | HitLocation ) |
◆ OnPaint()
| int32 SHitMarkerConfirmationWidget::OnPaint |
( |
const FPaintArgs & | Args, |
|
|
const FGeometry & | AllottedGeometry, |
|
|
const FSlateRect & | MyCullingRect, |
|
|
FSlateWindowElementList & | OutDrawElements, |
|
|
int32 | LayerId, |
|
|
const FWidgetStyle & | InWidgetStyle, |
|
|
bool | bParentEnabled ) const |
|
overridevirtual |
26{
27 const bool bIsEnabled = ShouldBeEnabled(bParentEnabled);
28 const ESlateDrawEffect DrawEffects = bIsEnabled ? ESlateDrawEffect::None : ESlateDrawEffect::DisabledEffect;
29 const FVector2D LocalCenter = AllottedGeometry.GetLocalPositionAtCoordinates(FVector2D(0.5f, 0.5f));
30
32 if (bDrawMarkers)
33 {
35 {
40
41
43 FSlateDrawElement::MakeBox(OutDrawElements, LayerId, Geometry,
AnyHitsMarkerImage, DrawEffects, MarkerColor);
44 }
45 }
46 return LayerId;
47}
◆ SLATE_BEGIN_ARGS()
24 : _PerHitMarkerImage(FCoreStyle::Get().GetBrush("Throbber.CircleChunk"))
25 , _AnyHitsMarkerImage(nullptr)
26 , _HitNotifyDuration(0.4f)
27 {
28 }
◆ Tick()
| void SHitMarkerConfirmationWidget::Tick |
( |
const FGeometry & | AllottedGeometry, |
|
|
const double | InCurrentTime, |
|
|
const float | InDeltaTime ) |
|
overridevirtual |
60{
62 const double TimeSinceLastHitNotification =
LastHitTime;
64 {
66 }
68}
◆ AnyHitsMarkerImage
| const FSlateBrush* SHitMarkerConfirmationWidget::AnyHitsMarkerImage = nullptr |
|
private |
The marker image to draw if there are any hits at all.
◆ bColorAndOpacitySet
| bool SHitMarkerConfirmationWidget::bColorAndOpacitySet |
|
private |
◆ ColorAndOpacity
| TAttribute<FSlateColor> SHitMarkerConfirmationWidget::ColorAndOpacity |
|
private |
Color and opacity of the markers
◆ HitNotifyDuration
| float SHitMarkerConfirmationWidget::HitNotifyDuration = 0.4f |
|
private |
The duration (in seconds) to display hit notifies (they fade to transparent over this time)
◆ HitNotifyOpacity
| float SHitMarkerConfirmationWidget::HitNotifyOpacity = 1.0f |
|
private |
The opacity for the hit markers
◆ LastHitTime
| float SHitMarkerConfirmationWidget::LastHitTime = 0.0f |
|
private |
◆ MyContext
| FLocalPlayerContext SHitMarkerConfirmationWidget::MyContext |
|
private |
Player context for the owning HUD
◆ PerHitMarkerImage
| const FSlateBrush* SHitMarkerConfirmationWidget::PerHitMarkerImage = nullptr |
|
private |
The marker image to draw for individual hit markers.
◆ PerHitMarkerZoneOverrideImages
| TMap<FGameplayTag, FSlateBrush> SHitMarkerConfirmationWidget::PerHitMarkerZoneOverrideImages |
|
private |
Map from zone tag (e.g., weak spot) to override marker images.
The documentation for this class was generated from the following files: