Sewer56.UI.Controller is a simple personal use library for navigating user interfaces via controllers (and/or other supported input devices). It is a modular library, allowing you to add your own custom backends for input and/or UI Platform.
Basic usage of the library is as follows:
Instantiation
// Create an IController, IPlatform and finally the Navigator
IController controller = new ReloadedInputController("Controller.json");
IPlatform platform = new WpfPlatform();
var navigator = new Navigator(Platform, Controller);
// Callback for handling custom controls/input (if necessary)
platform.ProcessCustomInputs += ProcessCustomInputs;That's all you need to do, just keep the Navigator around so it doesn't get garbage collected.
Modules
Sewer56.UI.Controller consists of 3 modules:
- Core: The core library, contained in
Sewer56.UI.Controller.Core. - IPlatform: Abstracts a UI platform like WPF or WinForms. (e.g.
Sewer56.UI.Controller.WPF). - IController: Provides input support to the library. (e.g.
Sewer56.UI.Controller.ReloadedInput)
- Sewer56.UI.Controller.WPF: Adds basic WPF support to the library.
- Sewer56.UI.Controller.ReloadedInput: Adds
Reloaded.Inputsupport to the library. - Sewer56.UI.Controller.ReloadedInput.Configurator: Adds the
Reloaded.InputConfigurator to this library.
Consider first becoming familiar with the basic Reloaded.Input usage here.
The ReloadedInputController class exports the methods:
MapButton: Maps a button to a button.MapTriggerToButton: Maps a controller trigger to a button. [Activates if >50% pressed]MapCustomStickBehaviour: Maps a stick to a button. [Activates if >75% moved]
And cooresponding UnMap functions.
Use ReloadedInputControllerWithConfigurator as your IController.
Call the Configure method to show the WPF powered configuration screen.
Note: Configurator built with Reloaded II's Default Theme in mind.
Mileage may vary with custom themes.
If you are interested in contributing to the library, the following diagram represents the internal structure of the library (at the time of writing):
Hopefully this can be useful 🤞.

