- Input handling is done straight in G_MapEventsToControls
- If a keyboard event is received, switch off virtual
keyboard
- Removed the input lock while virtual keyboard is
sliding away
- If a gamepad event is received, and it is a change of at
least half the full range, switch on virtual keyboard
Resolves#704
Now converts to skin prefcolor in:
- Player menu party
- Challenges menu
- Why it's done on this branch - want to avoid merge conflicts
- Gamepad indicator
- Actually fixes a bug at the same time for skins with nonstandard startcolors
- No need to call CV_RegisterVar
- Cvar definitions live in only one file, easier to locate
- Organized into sections -- netvars, cheats, etc.
- Use builder pattern to initialize cvars
- Still need to extern if you want to read the cvar value
- Will silently merge conflict with !1093, make sure to adjust PROFILEVER handling
- (profile_t *)->rumble
- cv_rumble[MAXSPLITSCREENPLAYERS]
- cv_dummyprofilerumble
- Disables all current rumbles when toggling off
- Prevents new rumbles from being set while turned off
- gc_rankings, bound to TAB by default
- Now a toggle, rather than a hold behaviour
- Rearrange HU_Drawer to have chat (and cecho/music credits) render over everything else (like, say, tab rankings)
- Update PROFILEVER to 2 so we can add the new control to old profiles
* Previous control checking flow:
* Current controller/keyboard (userbound controls).
* If on a menu:
* Current controller/keyboard (default controls).
* All controllers not in use by a player (default controls).
* New control checking flow:
* Current controller/keyboard (userbound controls).
* If player 0 and just checked a controller, check keyboard (userbound controls).
* If on a menu:
* Check all controllers not in use by a player (userbound controls).
* If keys are inaccessible/unbound and keybind is necessary to navigate menus, repeat eveyrhting with default controls.
* Instead of duplicated code, control the flow in a finer fashion.
* Now able to detect if gamepad inputs are possible to recieve (via checking deviceID), instead of assuming they are.
* If a keybind is set but inaccessible by the above metric, make it flash on the Profile Controls screen.
* Fix out-of-order key mappings for a given bind being invisible on the Profile Controls menu.
- Fix gamekeydown using FRACUNIT instead of JOYAXISRANGE
- Re-add spindash button functionality
- I put custom buttons back ... but they're now called "Lua" buttons A thru C because Custom was a dumb misleading name
For some reason gamepads have not been registering buttons for a while, which makes this pretty hard to continue. Not sure if it's to do with how the menu cmd is generated, or something deeper in the SDL code.
Ultra mega hacked in, by saving all "discarded" joysticks to an array so they don't get totally closed & we can still poll them. Events now properly send the device number instead of the player number, which means we can store all controllers pressing buttons, and thus, can detect when ANY controller is pressing anything, and THUS we can make the character select work like we wanted to :V
Did not bother fixing any of the bugs, however. First of all, the opening menus do not properly fallback to default controls. Yet again, we may need a more robust system -- storing all keys from gamekeydown separately? Additionally it seems like when I input gamepad it makes me use keyboard anyway, so I think something fishy is up.
Events have a player ID instead of adding billions of keys for separate gamepads. Axis movement (mouse movement, analog sticks) now are counted as keys, so axes don't need to be separately implemented for all controls. Game controls emulate a Saturn controller (some of the external functions like screenshot / gif should be readded, but I got lazy)
This will allow later us to save a config for a controller that can be reused for any player slot, which is one of the main goals for profiles.
Only just enough was made to use the new input system to make it compile. Menus in this branch should aim to move to using PlayerInputDown entirely, instead of using hardcoded keys & simply remapping to those