Requirements:
Be sure to activate Key binding in your project.
Edit->Settings->Engine->Enhanced Input->user settings->Enable user settings->True
Place the Options Widget inside your widget of your choice.
Go to the details panel
Device
Change this to the platform you are targeting.
Theme Highlights Colour
This will be the active colours. For example, the demo had the colour orange.
Background Brush
This is the dark border. You can make it transparent, change the colour or even make it an image.
Xbox Vector Image
Microsoft will give you one once you have a license.
PlayStation Vector Image
Sony will give you one once you have a license.
Any Input Mapping Context that you would like the player to change key binds. Add them to the array.
There are 3 Config Data tables 'CONFIG_General_Controls', 'CONFIG_Keyboard_Controls' and 'CONFIG_Controller_Controls'. These add the settings in the 3 windows General, Keyboard and Controller.
To add a setting, open the relative data table and select 'add row'.
The row name will be the setting title. Use _ for white spaces. eg, Invert_Y_Axis will show as: Invert Y Axis.
Settings for a table row are as follows:
isRange - If true, this setting will act as a slider. Outputting float values.
Default Value - If isRange is true this will be the default value of the slider setting.
Min Value - If isRange is true this will be the minimum value of the slider setting.
Max Value - If isRange is true this will be the Maximum value of the slider setting.
Step Size - - If isRange is true this will be the step size of the slider setting.
Options - If isRange is false, this will be the available options to select from. Like a combo box.
Selected - If isRange is false, this will be the selected option. Like a combo box.
Cooldown - Slows the selection progress down, so it doesn't fly by. Recommended is 0.3.
Input Text Size - If you have large words, you may want to spread the arrows. Set higher for a wider gap. Default is 1.0.
The options menu will dispatch events for all audio settings except the changing of Audio Output Device. Audio Output Device is handled by the options menu.
The 'Control Settings Changed' Event will be triggered whenever a user saves control settings.
The 'Control Settings Changed' Event fired, now what?
In your game instance or where ever you set your settings for your player, follow the next steps.
The controls are located in a save game. You can load this in your game instance whenever the 'Control Settings Changed' event fires.
Each of the 3 control types General, Keyboard and Controller, each have their own maps. You can access them like this.
The row name of the Data Table Configuration will be the map name. eg, We access the setting Invert_Y_Axis by using it's row name to get the Control Settings Structure. Then break this to get your settings.
Is Float - Will tell you if this setting is a float or a string.
Float - Value of your slider.
String - Selected Option.