andkrau / NuanceResurrection

Other
56 stars 5 forks source link

Add Joystick and configurable keybinding support #3

Closed cubanismo closed 1 year ago

cubanismo commented 1 year ago

This change adds DirectInput support, a dialog for configuring the key bindings and joystick bindings for the emulated controller, and support for saving and loading the key and joystick bindings to and from the nuance.cfg file.

-InputManager class is added to manage all the keyboard and DirectInput initialization and processing.

-ControllerButtonMapping class is added to encapsulate the keyboard or joystick action that triggers a given emulated controller button press.

-The NuonEnvironment class now tracks the joystick and keyboard bindings for each controller bitnum in the Nuon controller bitfield.

-The SaveConfigFile method is added to the NuonEnvironment class to handle serializing the configuration data back out to a config file.

-A controller configuration GUI dialog box is added to allow users to view and modify the current key and joystick bindings.

-A button to access the controller config dialog is added to the existing control panel dialog.

toxieainc commented 1 year ago

Looks pretty much perfect, thanks!