XInputium 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package XInputium --version 1.1.0                
NuGet\Install-Package XInputium -Version 1.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XInputium" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XInputium --version 1.1.0                
#r "nuget: XInputium, 1.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XInputium as a Cake Addin
#addin nuget:?package=XInputium&version=1.1.0

// Install XInputium as a Cake Tool
#tool nuget:?package=XInputium&version=1.1.0                

XInputium

XInputium is a .NET library that provides you out-of-the-box XInput integration into your application. In contrast with other existing .NET XInput libraries, XInputium introduces a full-fledged input system, and is designed to allow you to focus more on your game/application logic and less on input handling code.

Key features

  • A dedicated Event System, composed of dynamic events (events that are triggered accordingly to your custom specific conditions), as well as the regular .NET events.
  • Built-in input loop — you don't need to worry about managing input state logic between application/game frames. Just call a single method each frame, and XInputium will do the rest.
  • Built-in Joystick and Trigger functionality, like dead-zones, axis inversion, smoothing, sensitivity and many more.
  • Axis Modifier Functions allow you to modify axes in any way you wish. Several built-in functions included, which you can creatively combine to do whatever your game or application requires.
  • Map joysticks or triggers to buttons, using your own mapping criteria.
  • Compose layers of joysticks/triggers for specific parts of your application. For instance, the same joystick might have different simultaneous configurations depending on the current game/application mode the user is at.
  • XAML bindable — bind your XAML controls to any property (ex. joystick radius), and it just works.

Getting started

The following example code shows how you can consume XInputium:

    XGamepad gamepad = new();
    gamepad.ButtonPressed += (s, e) => Debug.WriteLine($"Button {e.Button} was pressed.");
    
    // Call this on every app/game frame.
    gamepad.Update();

XGamepad represents a logical controller device, and is the main class you would use to consume most of XInputium features. The only thing you need to do is to update the device state on every app/game frame, as shown in the previous example. Once you call gamepad.Update(), any consequent events will trigger.

XInputium is fully documented, and essential information in the remarks sections is included where necessary. The library is designed to be as easy to use as possible, while still providing powerful features. A Wiki page and Reference Documentation are planned for the near future, so keep an eye out.

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.0 3,886 6/20/2022
1.1.1 423 6/19/2022
1.1.0 441 6/17/2022