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

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -56,6 +56,7 @@ public:
// input device. Defaults to KeyboardMouse until the
// first gamepad button event is observed.
//
UFUNCTION(BlueprintCallable, Category="Luprex|Input")
static ElxControllerType GetLastControllerType();
private:

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);

View File

@@ -139,6 +139,9 @@ public:
UFUNCTION(BlueprintCallable)
void AddPointer(FVector2D Direction, float Scale);
UFUNCTION(BlueprintCallable)
void SetPointer(FVector2D Direction, float Scale);
UFUNCTION(BlueprintCallable)
FVector2D GetPointer() const { return PointerVector; }