Final form of radial menus

This commit is contained in:
2026-05-19 02:55:31 -04:00
parent 36ec4a3b9b
commit f7983b1f02
6 changed files with 18 additions and 6 deletions

View File

@@ -342,6 +342,11 @@ void URadialMenuWidget::SynchronizeProperties()
}
void URadialMenuWidget::AddPointer(FVector2D Direction, float Scale)
{
SetPointer(PointerVector + (Direction * Scale), 1.0);
}
void URadialMenuWidget::SetPointer(FVector2D Direction, float Scale)
{
if ((!IsVisible()) || (Directions.Num() == 0))
{
@@ -351,9 +356,9 @@ void URadialMenuWidget::AddPointer(FVector2D Direction, float Scale)
return;
}
PointerVector += (Direction * Scale);
PointerVector = (Direction * Scale);
if (PointerVector.Length() < 0.5)
if (PointerVector.Length() < 0.75)
{
SetSelectedItem(-1);
if (MySlateWidget.IsValid()) MySlateWidget->SetPointer(PointerVector);