diff --git a/Content/Luprex/InputActions/IA_Menu.uasset b/Content/Luprex/InputActions/IA_Menu.uasset new file mode 100644 index 00000000..ba9080bc --- /dev/null +++ b/Content/Luprex/InputActions/IA_Menu.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18c808a5424c3d4231cda34c37ddea999b8d28f39a9858e0305d4ef833e67ec9 +size 1344 diff --git a/Content/Luprex/lxMappingContext.uasset b/Content/Luprex/lxMappingContext.uasset index ba1e4a7d..7dcd323b 100644 --- a/Content/Luprex/lxMappingContext.uasset +++ b/Content/Luprex/lxMappingContext.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7584c5d6741626e4aefeb8210a82c9dc0a620bfe982b4d888f0bc49dd059a73a -size 25118 +oid sha256:1d499a2e5a0daf85def5c3690cac7444f2a0c5d11bc7efaf55a595592d12fdca +size 28583 diff --git a/Content/Widgets/WB_Menu.uasset b/Content/Widgets/WB_Menu.uasset index 04311cbe..84bcb540 100644 --- a/Content/Widgets/WB_Menu.uasset +++ b/Content/Widgets/WB_Menu.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:afc9e0a879537cc635ad88865eba8fa6479a11464b0d4bc2d641527b5d297ebb -size 218369 +oid sha256:5997c50fd19af7bb4a9c916de2e339e82b71ec99a28043a1a539b8effc488a5c +size 239534 diff --git a/Source/Integration/InputDeviceTracker.h b/Source/Integration/InputDeviceTracker.h index 81927b0a..f256b48c 100644 --- a/Source/Integration/InputDeviceTracker.h +++ b/Source/Integration/InputDeviceTracker.h @@ -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: diff --git a/Source/Integration/RadialMenu.cpp b/Source/Integration/RadialMenu.cpp index afdc5864..e983303a 100644 --- a/Source/Integration/RadialMenu.cpp +++ b/Source/Integration/RadialMenu.cpp @@ -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); diff --git a/Source/Integration/RadialMenu.h b/Source/Integration/RadialMenu.h index 2cc80456..8090ae40 100644 --- a/Source/Integration/RadialMenu.h +++ b/Source/Integration/RadialMenu.h @@ -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; }