Final form of radial menus
This commit is contained in:
BIN
Content/Luprex/InputActions/IA_Menu.uasset
LFS
Normal file
BIN
Content/Luprex/InputActions/IA_Menu.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
BIN
Content/Widgets/WB_Menu.uasset
LFS
BIN
Content/Widgets/WB_Menu.uasset
LFS
Binary file not shown.
@@ -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:
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user