| // Copyright Epic Games, Inc. All Rights Reserved. | |
| class SWidget; | |
| UCircumferenceMarkerWidget::UCircumferenceMarkerWidget(const FObjectInitializer& ObjectInitializer) | |
| : Super(ObjectInitializer) | |
| { | |
| SetVisibility(ESlateVisibility::HitTestInvisible); | |
| bIsVolatile = true; | |
| } | |
| void UCircumferenceMarkerWidget::ReleaseSlateResources(bool bReleaseChildren) | |
| { | |
| Super::ReleaseSlateResources(bReleaseChildren); | |
| MyMarkerWidget.Reset(); | |
| } | |
| TSharedRef<SWidget> UCircumferenceMarkerWidget::RebuildWidget() | |
| { | |
| MyMarkerWidget = SNew(SCircumferenceMarkerWidget) | |
| .MarkerBrush(&MarkerImage) | |
| .Radius(this->Radius) | |
| .MarkerList(this->MarkerList); | |
| return MyMarkerWidget.ToSharedRef(); | |
| } | |
| void UCircumferenceMarkerWidget::SynchronizeProperties() | |
| { | |
| Super::SynchronizeProperties(); | |
| MyMarkerWidget->SetRadius(Radius); | |
| MyMarkerWidget->SetMarkerList(MarkerList); | |
| } | |
| void UCircumferenceMarkerWidget::SetRadius(float InRadius) | |
| { | |
| Radius = InRadius; | |
| if (MyMarkerWidget.IsValid()) | |
| { | |
| MyMarkerWidget->SetRadius(InRadius); | |
| } | |
| } | |