21 explicit UWheelMenu(
const FObjectInitializer& ObjectInitializer);
25 virtual bool GetCurrentIndex(int32& Value)
const override;
26 virtual void StartUpdateInput()
override;
27 virtual void CenterMousePosition()
override;
30 UFUNCTION(BlueprintCallable, Category=
"Radial Wheel")
31 FVector2D GetJoystickDirection(
const bool bLeft)
const;
46 virtual void UpdateInput();
48 FVector2D FixInputRotation(
const FVector2D& Input)
const;
49 void SetInDeadZone(
const bool bValue);
50 FVector2D GetScreenCenter()
const;
53 UFUNCTION(BlueprintCallable, Category=
"Radial Wheel")
54 float GetSectionDegreeSize()
const;
55 UFUNCTION(BlueprintCallable, Category=
"Radial Wheel")
56 float GetSectionDegreeSizeUp()
const;
57 UFUNCTION(BlueprintCallable, Category=
"Radial Wheel")
58 FVector GetSegmentDirection(
const int32 SegmentIndex)
const;
60 UFUNCTION(BlueprintCallable, Category=
"Radial Wheel", meta=(BlueprintPure=
false))
61 void UpdateChildPositions()
const;
62 UFUNCTION(BlueprintCallable, Category=
"Radial Wheel", meta=(BlueprintPure=
false))
63 void SetBackgroundRotation()
const;
65 UFUNCTION(BlueprintCallable, Category=
"Radial Wheel")
66 void UpdateDirectionWithMouseCursor();
67 UFUNCTION(BlueprintCallable, Category=
"Radial Wheel")
68 void UpdateDirectionWithJoystick();
70 UFUNCTION(BlueprintCallable, Category=
"Radial Wheel")
71 void SetInputDirection(
const FVector2D Direction);
74 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget), Category=
"Radial Wheel|Widgets")
75 class UOverlay* RootOverlay =
nullptr;
76 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget), Category="Radial Wheel|Widgets")
77 class UImage* RadialBackground =
nullptr;
78 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget), Category="Radial Wheel|Widgets")
79 class UImage* RadialDebug =
nullptr;
80 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget), Category="Radial Wheel|Widgets")
82 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget), Category="Radial Wheel|Widgets")
84 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget), Category="Radial Wheel|Widgets")
85 class USizeBox* SizeBox =
nullptr;
87 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|
General")
88 float UpdateSpeed = 1.0f;
92 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|
Debug")
93 bool bNormalize = false;
98 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|
General")
99 float ItemOffsetRadius = 180.0f;
101 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Radial Wheel|
General")
102 bool bAutoRotateForUp = true;
103 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Radial Wheel|
General")
104 bool bUseCustomInput = false;
105 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Radial Wheel|
General")
106 float MouseDeadZone = 0.2f;
108 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Radial Wheel|
General")
109 float JoystickDeadZone = 0.3f;
111 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material")
112 UMaterialInterface* MaterialBase =
nullptr;
113 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material|Names")
114 FName MaterialParamSegments = FName("Segments");
115 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material|Names")
116 FName MaterialParamIndex = FName("
Index");
117 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material|Names")
118 FName MaterialParamDeadZone = FName("Deadzone");
119 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material|Names")
120 FName MaterialParamRadialTexture = FName("RadialTexture");
121 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material")
122 bool bUseCustomTexture = false;
123 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material")
124 UTexture2D* RadialTexture =
nullptr;
125 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material")
126 bool bUseCustomColors = false;
128 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material|Names")
129 FName MaterialParamOuterRingColor = FName("OuterRingColor");
130 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material|Names")
131 FName MaterialParamInnerRingColor = FName("InnerRingColor");
132 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material|Names")
133 FName MaterialParamRingMainColor = FName("RingMainColor");
134 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material|Names")
135 FName MaterialParamUnhighlightColor = FName("UnhighlightColor");
136 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material|Colors")
137 FLinearColor OuterRingColorDefault = FLinearColor(0.0f,0.25641f, 1.0f);
138 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material|Colors")
139 FLinearColor InnerRingColorDefault = FLinearColor(0.369792f,0.369792f, 0.369792f);
140 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material|Colors")
141 FLinearColor RingMainColorDefault = FLinearColor(1.0f,1.0f, 1.0f);
142 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material|Colors")
143 FLinearColor UnhighlightColorDefault = FLinearColor(0.291667f, 0.291667f, 0.291667f);
144 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material|Colors")
145 FVector2D MenuSizeDefault = FVector2D(512.0f, 512.0f);
150 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Radial Wheel|
General")
151 bool bUseDeadZoneEvents = false;
155 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Radial Wheel|
General")
156 float IndexRaw = 0.0f;
158 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Radial Wheel|
General")
160 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Radial Wheel|
General")
162 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Radial Wheel|
General")
163 bool bInDeadZone = false;
164 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Radial Wheel|
General")
165 FVector2D CurrentInput = FVector2D::ZeroVector;
166 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material")
167 UMaterialInstanceDynamic* DynamicMaterial =
nullptr;
168 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Radial Wheel|Material")
175 void SetCancelText() const;
176 void ClearDescriptionText() const;
178 void SetColors(const FLinearColor& OuterRing, const FLinearColor& InnerRing, const FLinearColor& RingMain, const FLinearColor& UnHighlight);
179 void SetColorsToDefault();
181 void SetMenuSize() const;
183 void CreateMaterial();
184 void UpdateMaterials() const;
185 void UpdateMaterialVisuals() const;
187 void SetMaterialSegments() const;
194 FTimerHandle UpdateSpeedTimer;
196 UPROPERTY(EditAnywhere, Category="Radial Wheel|
General")
197 TSubclassOf<UUserWidget> RadialSegmentClass;
199 UPROPERTY(VisibleAnywhere, Category="Radial Wheel|Material|Colors")
200 FLinearColor OuterRingColor = FLinearColor(0.0f,0.25641f, 1.0f);
201 UPROPERTY(VisibleAnywhere, Category="Radial Wheel|Material|Colors")
202 FLinearColor InnerRingColor = FLinearColor(0.369792f,0.369792f, 0.369792f);
203 UPROPERTY(VisibleAnywhere, Category="Radial Wheel|Material|Colors")
204 FLinearColor RingMainColor = FLinearColor(1.0f,1.0f, 1.0f);
205 UPROPERTY(VisibleAnywhere, Category="Radial Wheel|Material|Colors")
206 FLinearColor UnhighlightColor = FLinearColor(0.291667f, 0.291667f, 0.291667f);