Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ MoveToVisuallyClosestPoint() [1/2]

void Terraria.GameContent.UI.States.UIGamepadHelper.MoveToVisuallyClosestPoint ( int idRangeStartInclusive,
int idRangeEndExclusive )
inline

Definition at line 290 of file UIGamepadHelper.cs.

291 {
293 {
294 return;
295 }
297 Vector2 mouseScreen = Main.MouseScreen;
299 for (int i = idRangeStartInclusive; i < idRangeEndExclusive; i++)
300 {
301 if (!points.TryGetValue(i, out var value))
302 {
303 return;
304 }
305 if (uILinkPoint == null || Vector2.Distance(mouseScreen, uILinkPoint.Position) > Vector2.Distance(mouseScreen, value.Position))
306 {
308 }
309 }
310 if (uILinkPoint != null)
311 {
313 }
314 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
static Dictionary< int, UILinkPoint > Points
static float Distance(Vector2 value1, Vector2 value2)
Definition Vector2.cs:91

References Terraria.UI.Gamepad.UILinkPointNavigator.ChangePoint(), Terraria.UI.Gamepad.UILinkPointNavigator.CurrentPoint, Microsoft.Xna.Framework.Vector2.Distance(), Terraria.Main.MouseScreen, Terraria.UI.Gamepad.UILinkPointNavigator.Points, System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue(), and System.value.