Files
sbox-public/engine/Sandbox.Engine/Systems/Input/PlayerIndex.cs
Tony Ferguson 5524cb0766 Input Scoping Refactor (#4934)
* Adds `Input.PlayerScope( Input.PlayerIndex )`
* Obsolete `Input.PlayerScope( int )`
* Separates out `KeyboardAndMouse` and `Controller(x)` inputs when input scoping, which was previously not possible
2026-06-03 15:14:12 +01:00

38 lines
684 B
C#

namespace Sandbox;
public static partial class Input
{
/// <summary>
/// Identifies which player slot to scope input for.
/// Use with <see cref="Input.PlayerScope(PlayerIndex)"/> to read input from a specific device.
/// </summary>
[Expose]
public enum PlayerIndex
{
/// <summary>
/// Keyboard and mouse input only.
/// </summary>
KeyboardAndMouse = 0,
/// <summary>
/// First controller.
/// </summary>
Controller1 = 1,
/// <summary>
/// Second controller.
/// </summary>
Controller2 = 2,
/// <summary>
/// Third controller.
/// </summary>
Controller3 = 3,
/// <summary>
/// Fourth controller.
/// </summary>
Controller4 = 4
}
}