Overhauled keybind remap part of options menu

Fix audio options menu so it correctly save and applies settings
This commit is contained in:
Areloch 2020-06-01 03:55:25 -05:00
parent 69089e1ee2
commit 11f0ec2c0f
13 changed files with 1230 additions and 662 deletions

View file

@ -20,9 +20,73 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
$RemapName[$RemapCount] = "Forward";
$RemapCmd[$RemapCount] = "moveforward";
$RemapActionMap[$RemapCount] = "ExampleMoveMap";
$RemapDevice[$RemapCount] = "keyboard";
$RemapDescription[$RemapCount] = "Forward Movement";
$RemapCount++;
$RemapName[$RemapCount] = "Backward";
$RemapCmd[$RemapCount] = "movebackward";
$RemapActionMap[$RemapCount] = "ExampleMoveMap";
$RemapDevice[$RemapCount] = "keyboard";
$RemapDescription[$RemapCount] = "Backward Movement";
$RemapCount++;
$RemapName[$RemapCount] = "Strafe Left";
$RemapCmd[$RemapCount] = "moveleft";
$RemapActionMap[$RemapCount] = "ExampleMoveMap";
$RemapDevice[$RemapCount] = "keyboard";
$RemapDescription[$RemapCount] = "Left Strafing Movement";
$RemapCount++;
$RemapName[$RemapCount] = "Strafe Right";
$RemapCmd[$RemapCount] = "moveright";
$RemapActionMap[$RemapCount] = "ExampleMoveMap";
$RemapDevice[$RemapCount] = "keyboard";
$RemapDescription[$RemapCount] = "Right Strafing Movement";
$RemapCount++;
$RemapName[$RemapCount] = "Ascend";
$RemapCmd[$RemapCount] = "moveup";
$RemapActionMap[$RemapCount] = "ExampleMoveMap";
$RemapDevice[$RemapCount] = "keyboard";
$RemapDescription[$RemapCount] = "Makes the camera ascend";
$RemapCount++;
$RemapName[$RemapCount] = "Descend";
$RemapCmd[$RemapCount] = "movedown";
$RemapActionMap[$RemapCount] = "ExampleMoveMap";
$RemapDevice[$RemapCount] = "keyboard";
$RemapDescription[$RemapCount] = "Makes the camera descend";
$RemapCount++;
$RemapName[$RemapCount] = "Jump";
$RemapCmd[$RemapCount] = "jump";
$RemapActionMap[$RemapCount] = "ExampleMoveMap";
$RemapDevice[$RemapCount] = "keyboard";
$RemapDescription[$RemapCount] = "Jump";
$RemapCount++;
$RemapName[$RemapCount] = "Ascend";
$RemapCmd[$RemapCount] = "moveup";
$RemapActionMap[$RemapCount] = "ExampleMoveMap";
$RemapDevice[$RemapCount] = "gamepad";
$RemapDescription[$RemapCount] = "Makes the camera ascend";
$RemapCount++;
$RemapName[$RemapCount] = "Descend";
$RemapCmd[$RemapCount] = "movedown";
$RemapActionMap[$RemapCount] = "ExampleMoveMap";
$RemapDevice[$RemapCount] = "gamepad";
$RemapDescription[$RemapCount] = "Makes the camera descend";
$RemapCount++;
$RemapName[$RemapCount] = "Jump";
$RemapCmd[$RemapCount] = "jump";
$RemapActionMap[$RemapCount] = "ExampleMoveMap";
$RemapDevice[$RemapCount] = "gamepad";
$RemapDescription[$RemapCount] = "Jump";
$RemapCount++;
if ( isObject( ExampleMoveMap ) )
ExampleMoveMap.delete();
new ActionMap(ExampleMoveMap);
ExampleMoveMap.humanReadableName = "Example Movement";
//------------------------------------------------------------------------------
// Non-remapable binds
@ -61,6 +125,8 @@ ExampleMoveMap.bind( gamepad, thumblx, "D", "-0.23 0.23", gamePadMoveX );
ExampleMoveMap.bind( gamepad, thumbly, "D", "-0.23 0.23", gamePadMoveY );
ExampleMoveMap.bind( gamepad, btn_a, jump );
ExampleMoveMap.bind( gamepad, btn_x, moveup );
ExampleMoveMap.bind( gamepad, btn_y, movedown );
ExampleMoveMap.bindCmd( gamepad, btn_back, "disconnect();", "" );
//------------------------------------------------------------------------------