GamepadStickBinding Class
Binds a gamepad stick (left or right) and returns one axis of the radial-deadzone result. Use Brine2D.Input.GamepadStick.Left or Brine2D.Input.GamepadStick.Right to select the stick, and GamepadStickAxis to select X or Y. This applies the same radial deadzone as GetGamepadLeftStick(int) / GetGamepadRightStick(int), giving consistent 2D behavior through the binding system. Edge detection (Brine2D.Input.GamepadStickBinding.IsPressed(Brine2D.Input.IInputContext) / Brine2D.Input.GamepadStickBinding.IsReleased(Brine2D.Input.IInputContext)) delegates to the underlying per-axis methods but cross-checks the radial deadzone result so that Brine2D.Input.GamepadStickBinding.IsPressed(Brine2D.Input.IInputContext) cannot fire when the radial magnitude is below threshold.
public sealed record GamepadStickBinding : Brine2D.Input.InputBinding, System.IEquatable<Brine2D.Input.GamepadStickBinding>
Inheritance System.Object → InputBinding → GamepadStickBinding
Implements System.IEquatable<GamepadStickBinding>
| Constructors | |
|---|---|
| GamepadStickBinding(GamepadStick, GamepadStickAxis, int) | Binds a gamepad stick (left or right) and returns one axis of the radial-deadzone result. Use Brine2D.Input.GamepadStick.Left or Brine2D.Input.GamepadStick.Right to select the stick, and GamepadStickAxis to select X or Y. This applies the same radial deadzone as GetGamepadLeftStick(int) / GetGamepadRightStick(int), giving consistent 2D behavior through the binding system. Edge detection (Brine2D.Input.GamepadStickBinding.IsPressed(Brine2D.Input.IInputContext) / Brine2D.Input.GamepadStickBinding.IsReleased(Brine2D.Input.IInputContext)) delegates to the underlying per-axis methods but cross-checks the radial deadzone result so that Brine2D.Input.GamepadStickBinding.IsPressed(Brine2D.Input.IInputContext) cannot fire when the radial magnitude is below threshold. |