A basic input manager for use with SFML.Net and XInput.
MiInput is the new name for my old SFInput library.
MiInput is a simple action based input manager using SFML.Net for mouse and keyboard input and XInput for joystick input. MiInput was written entirely for my own usage in my own projects, but if anyone else ends up using it, I am open to suggestions and will attempt to fix any issues.
- SFML.Net
https://github.com/SFML/SFML.Net.git
- MiCore
https://github.com/BrokenShards/MiCore.git
- XInputDotNetPure
https://github.com/speps/XInputDotNet.git
See MiInputTest/Example.cs
for example code and usage.
- Updated coding style throughout to use newer C# features brought with the change to .Net 5.
- Now using .Net 5 (Core) rather than the .Net Framework.
- MiCore dependency now from NuGet package.
- Instead of directly using the
SFML.Window.Keyboard.Key
enum for keyboard events, a clone enum 'Key' is used instead.Key
does not includeKey.Unknown
or the depreciated keys so iterating overEnum.GetNames
ensures the index is the same as the enum value. - Updated MiCore to version 0.10.0.
- Now
JoystickState
andJoystickManager
just use the first connected joystick rather than specifying the player index, because of this,Input.Actions
is no longer an array. - Updated MiCore to version 0.9.0.
- Changed SFML source to latest official SFML.Net repository.
- Updated MiCore to version 0.5.0.
- Renamed to
MiInput
and updated to use theMiCore
library.
- Added
Input.LastDevice
to easily check the most recent input device type. - When loading
ActionSet
orInput
from xml, the element name is no longer checked to be consistant with other classes. - Log messages are now more consistant and concise.
- Fixed issue where
Input.SaveToFile(string,bool)
was not usingInput.DefaultPath
when the given path is null. - Updated SharpSerial to version 0.5.0.
- Added constructor and function to
ActionSet
for adding multipleAction
s at once. - Added functions to
KeyboardManager
,MouseManager
andJoystickManager
to easily detect if any keys or buttons are pressed, were just pressed, were just released, or if any axies have moved.
- Now SharpSerial is used as an interface to load and save
InputMap
,Action
,ActionSet
andInput
to and from file. Input.Actions
is now an array containing an action set for each player rather than just a single action set.- Corrected joystick trigger axis logic.
- Now
XInputInterface.dll
is coppied to the build directory on a successful build. - Updated SharpLogger to version 0.3.1.
- Now the xml documentation is built with the binary and is included in releases.
- Dependencies have been updated and are now included as binary files rather than as git submodules.
- Dependency source is now clearly shown in the readme.
- Actions now privately contain their input maps and have functions for managing them in order to prevent adding input maps that are either inavlid or collide with existing input maps.
- Action sets now have the
Clear()
function for removing all actions at once. - Added example code in
MiInputTest/Example.cs
and updated tests.
- Now only XInput is used for the joystick backend making action loading, saving and usage more consistent.
- Restructured project to reduce repeated code and seperate SFML and XInput joystick implementations.
- Changing between SFML and XInput joystick input backends will invalidate actions and is now stated.
- Now XInput can be used for the joystick backend. This is enabled by default and can be changed on the fly.
- Cleaned up API for less verbose usage.
- Initial release.