Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lparkermg/LPSoft.Stride.InputExtensions
Input Extensions to use with Stride3D
https://github.com/lparkermg/LPSoft.Stride.InputExtensions
Last synced: 3 days ago
JSON representation
Input Extensions to use with Stride3D
- Host: GitHub
- URL: https://github.com/lparkermg/LPSoft.Stride.InputExtensions
- Owner: lparkermg
- License: bsd-3-clause
- Created: 2022-02-17T20:37:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-02-26T13:48:26.000Z (over 2 years ago)
- Last Synced: 2024-11-05T22:44:51.910Z (11 days ago)
- Language: C#
- Size: 9.77 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-Stride - Easier input binding configuration
README
# LPSoft.Stride.InputExtensions
Input Extensions to use with Stride3D## BuildInputConfig
BuildInputConfig is a package for building input configurations using Stride3Ds VirtualButtons, it allows setting up the bindings from dictionary and from json file.
Each from returns the current InputBuilder object and Build returns a populated VirtualButtonConfig object.
```
var builder = new InputBuilder();
var config = builder
.FromDictionary(new Dictionary {{"Test_Binding", new[] { VirtualButton.GamePad.A }}})
.FromJson("jsonFile.json")
.Build();
````jsonFile.json`
```
{
"Test_Binding_2": ["Keyboard.space", "GamePad.B"],
...
}
```In the json file the key can be any string, where as any of the inputs use the same format that is returned by the VirtualButtons `.ToString()` function.