Skip to content

Commit a7ca2e9

Browse files
committed
fixed format
1 parent d209cbe commit a7ca2e9

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

Assets/Tests/InputSystem/Plugins/OnScreenTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ public IEnumerator Devices_CanHaveOnScreenJoystickControls([Values(false, true)]
435435
stickLeftTransform.sizeDelta = new Vector2(100, 100);
436436
stickLeft.controlPath = "<Gamepad>/leftStick";
437437
stickLeftGO.SetActive(true);
438-
438+
439439
var stickRightGO = new GameObject("StickRight");
440440
stickRightGO.SetActive(false);
441441
var stickRightTransform = stickRightGO.AddComponent<RectTransform>();
@@ -506,7 +506,7 @@ public IEnumerator Devices_CanHaveOnScreenJoystickControls([Values(false, true)]
506506
InputSystem.Update(); // Button is feeding events when responding to UI events.
507507

508508
Assert.That(Gamepad.all[0].buttonSouth.isPressed, Is.False);
509-
509+
510510
// Touch the right stick and drag it downwards
511511
BeginTouch(2, new Vector2(550, 150));
512512
yield return null;
@@ -519,7 +519,7 @@ public IEnumerator Devices_CanHaveOnScreenJoystickControls([Values(false, true)]
519519

520520
Assert.That(Gamepad.all[0].leftStick.ReadValue(), Is.EqualTo(new Vector2(0, 1)).Using(Vector2EqualityComparer.Instance));
521521
Assert.That(Gamepad.all[0].rightStick.ReadValue(), Is.EqualTo(new Vector2(0, -1)).Using(Vector2EqualityComparer.Instance));
522-
522+
523523
// Release finger one and move second and ensure that it still works
524524
EndTouch(1, new Vector2(550, 200));
525525
MoveTouch(2, new Vector2(600, 150));
@@ -529,7 +529,7 @@ public IEnumerator Devices_CanHaveOnScreenJoystickControls([Values(false, true)]
529529

530530
Assert.That(Gamepad.all[0].leftStick.ReadValue(), Is.EqualTo(new Vector2(0, 0)).Using(Vector2EqualityComparer.Instance));
531531
Assert.That(Gamepad.all[0].rightStick.ReadValue(), Is.EqualTo(new Vector2(1, 0)).Using(Vector2EqualityComparer.Instance));
532-
532+
533533
// Release finger two
534534
EndTouch(2, new Vector2(600, 150));
535535
yield return null;
@@ -565,7 +565,7 @@ public IEnumerator Devices_OnScreenStickDoesNotReceivePointerUpEventsInIsolatedM
565565
{
566566
uiTestScene.uiInputModule.actionsAsset.actionMaps[0].LazyResolveBindings(true);
567567
};
568-
568+
569569
// Ensure that the OnScreenStick component has been started
570570
yield return null;
571571

Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ private void OnPointerDown(InputAction.CallbackContext ctx)
243243
{
244244
screenPosition = pointer.position.ReadValue();
245245
}
246-
246+
247247
m_PointerEventData.position = screenPosition;
248248
EventSystem.current.RaycastAll(m_PointerEventData, m_RaycastResults);
249249
if (m_RaycastResults.Count == 0)
@@ -267,11 +267,11 @@ private void OnPointerDown(InputAction.CallbackContext ctx)
267267
m_TouchControl = touchControl;
268268
m_PointerMoveAction.ApplyBindingOverride($"{touchControl.path}/position", path: "<Touchscreen>/touch*/position");
269269
}
270-
270+
271271
m_PointerMoveAction.performed += OnPointerMove;
272272
m_IsIsolationActive = true;
273273
}
274-
274+
275275
private void OnPointerChanged(InputAction.CallbackContext ctx)
276276
{
277277
if (ctx.control.IsPressed())
@@ -285,8 +285,8 @@ private void OnPointerMove(InputAction.CallbackContext ctx)
285285
// only pointer devices are allowed
286286
Debug.Assert(ctx.control?.device is Pointer);
287287
Vector2 screenPosition;
288-
289-
// If it's a finger take the value from the finger that initiated the change
288+
289+
// If it's a finger take the value from the finger that initiated the change
290290
if (m_TouchControl != null)
291291
{
292292
// if the finger is up ignore the move
@@ -307,15 +307,15 @@ private void OnPointerMove(InputAction.CallbackContext ctx)
307307
private void OnPointerUp(InputAction.CallbackContext ctx)
308308
{
309309
if (!m_IsIsolationActive) return;
310-
310+
311311
// if it's a finger ensure that is the one that get released
312312
if (m_TouchControl != null)
313313
{
314314
if (m_TouchControl.isInProgress) return;
315-
m_PointerMoveAction.ApplyBindingOverride(null, path: "<Touchscreen>/touch*/position");
315+
m_PointerMoveAction.ApplyBindingOverride(null, path: "<Touchscreen>/touch*/position");
316316
m_TouchControl = null;
317317
}
318-
318+
319319
EndInteraction();
320320
m_PointerMoveAction.performed -= OnPointerMove;
321321
m_IsIsolationActive = false;

0 commit comments

Comments
 (0)