Commit graph

329 commits

Author SHA1 Message Date
SinnamonLat
c750c17f37 fix softlock on profile character select 2022-02-26 10:52:50 +01:00
SinnamonLat
964d503988 Prevent profile player name from writing out of bounds 2022-02-26 10:45:27 +01:00
SinnamonLat
87dfa790cb Fix stupid potential softlock on control setup with device detection 2022-02-20 09:50:18 +01:00
SinnamonLat
94c18f535a Map 4 keys per button. Detect device when mapping 2022-02-20 09:40:36 +01:00
SinnamonLat
168f393a62 Remove softlock check as it's unecessary after all 2022-02-20 09:40:35 +01:00
James R
3504f7ebd3 Map buffered inputs to menucmd
This lets buffered tapping not count as one held input.
2022-02-19 16:30:23 -08:00
James R
68ed9982b6 Fix virtual keyboard left wrap 2022-02-19 16:12:12 -08:00
James R
6eaf350387 Process keyboard text inputs at responder 2022-02-19 16:08:35 -08:00
SinnamonLat
7612d7cdf9 CharSel: Make sure the clone we're hovering over actually exists 2022-02-19 22:15:56 +01:00
SinnamonLat
2789d1d90e Allow unbinding controls with C, prevent softlocks by having core keys unbound. (Also fix a silly bug introduced by a previous commit) 2022-02-19 22:10:37 +01:00
SinnamonLat
b9a494551e Don't display empty profiles on player setup 2022-02-19 21:49:08 +01:00
SinnamonLat
8920ec8e6a Disable profile setup outside of GS_MENU 2022-02-19 21:45:42 +01:00
SinnamonLat
33639d7a4c Change button mappings ingame. Put delay after remapping a button to avoid very silly things 2022-02-19 19:25:51 +01:00
SinnamonLat
2b74b7188f profiles: they work(?) now 2022-02-19 18:57:17 +01:00
SinnamonLat
3aadf1bff0 Allow creating new profiles 2022-02-19 16:08:50 +01:00
SinnamonLat
debc93ff5c Make sure to reset setup_player when backing out to not interfere with profile display 2022-02-19 13:43:21 +01:00
SinnamonLat
2e4a58095a Allow ev_joystick for button mappings, oops 2022-02-19 13:31:34 +01:00
SinnamonLat
ebc2156b7e Profiles: control setup (wip but does what it needs to for now) 2022-02-19 13:26:02 +01:00
SinnamonLat
5601fa4c22 profiles: character/colour select 2022-02-18 13:46:32 +01:00
SinnamonLat
0ac0efda70 Add typing menu overlay for controller parity 2022-02-17 15:05:22 +01:00
SinnamonLat
8efba24df7 profiles: start on edit menu (it does nothing) 2022-02-16 23:57:06 +01:00
SinnamonLat
c44300d39f Use mockup design for cards, allow moving around and getting out of the profile menu. Still can't make/edit profiles 2022-02-16 10:29:01 +01:00
SinnamonLat
aea066b70f Update menus to use the new input system all over... 2022-02-15 23:30:51 +01:00
SinnamonLat
8c53108d17 Start on profiles menu (does nothing and softlocks) 2022-02-15 01:28:57 +01:00
Sally Coolatta
a7022af93f Fix cup select & level select to both use the new input handling systems 2021-12-28 12:27:59 -05:00
Sally Coolatta
0179466107 Finalize char select multiplayer
- Add menu control fallbacks.
    - If it could not find a bind using your existing keys, then it looks at default controls.
    - If it could not find it then, and you're P1, then it looks through gamepads, and then lastly settles for keyboard.
    - Changed around the order of operations on the character select menu, to accommodate for this change.
- Added initroutine to menu_t, which is called every time without question when going to a new menu. This solves many, many minor bugs you could experience in the character select menu when changing between menus, due to things only being properly reset when selecting the character select menu option.
2021-12-28 12:02:31 -05:00
Sally Coolatta
3890c06a4d Fix number of players counter breaking when entering as player 1 & then exiting 2021-12-28 08:54:23 -05:00
Sally Coolatta
b1d36496b2 Properly implement joystick axes
NOW it's fully navigable with controller
2021-12-28 08:44:20 -05:00
Sally Coolatta
92aff0b57c Finish some unused SDL hat input support to use events rather than polling all of the time 2021-12-28 08:02:32 -05:00
Sally Coolatta
f0a3dc74bb Fix control saving 2021-12-28 06:48:53 -05:00
Sally Coolatta
25342af17f Slight adjustments to cause less misclicks 2021-12-28 05:48:17 -05:00
Sally Coolatta
c49a5dd0cf Properly only accept menu controls when its active 2021-12-28 05:19:04 -05:00
Sally Coolatta
7684f5980a Almost multiplayer char select
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.
2021-12-25 08:58:21 -05:00
Sally Coolatta
d6d561f0e8 Unset delay when not pressing anything
Allows for mashing a button to be just as responsive as before
2021-12-25 07:10:56 -05:00
Sally Coolatta
e53ad4edf4 Char select fixes
- Allow input for multiplayer now
- Unset all devices in this menu
2021-12-25 07:02:07 -05:00
Sally Coolatta
e628894b47 Merge branch 'new-menus' into profiles 2021-12-25 06:09:53 -05:00
SinnamonLat
813b2da065 Fix the host menu re-folding on itself if you backed out of difficulty selection 2021-12-11 18:32:50 +01:00
SinnamonLat
cdb3b1ca98 Difficulty select before GP, match race & netgames 2021-12-11 18:22:56 +01:00
SinnamonLat
f093d5783f Put back the transition for addons screen after all... 2021-12-10 20:31:07 +01:00
SinnamonLat
9de737682d extras: replay hut 2021-12-10 20:30:09 +01:00
SinnamonLat
75df86da2f extras menu: addons 2021-12-10 16:15:54 +01:00
SinnamonLat
2e79d84f4a Extras menu barebones start, it does nothing 2021-12-10 16:07:36 +01:00
Sally Coolatta
d067c1ddef First pass on character select device select
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.
2021-12-06 17:43:52 -05:00
Sally Coolatta
ecffa90949 Add menucmd system
Allows menu input delays to feel sorta similar to how they did before ... maybe  could be adjusted further, since it feels just a tad bit touchy to me, but it's much better than before when it was a static value.
2021-12-06 14:53:30 -05:00
Sally Coolatta
d2e26bbc86 Finish menu input for char select
TODO:
- Menu delay shouldn't be a static value and work closer to how it did before (likely requires a more complicated system than just calling G_PlayerInputDown ... menu ticcmds? lol)
- Create a sdl function to determine if any of the possible joysticks' buttons are being pressed & return the joystick number & set usejoystick to that number ... for the PRESS START prompt.

Already tired of this code, I'm good
2021-12-04 17:58:23 -05:00
Sally Coolatta
58d5d1759b Set menu delay between menus 2021-12-04 17:34:34 -05:00
Sally Coolatta
4cef6ee0df More menu inputting (delays + partial support for character select)
Suddenly stopped compiling as I was working on this, with the same error it gave when before james merged the makefile changes, even though it was fine a minute ago and those changes are distinctly in here, so I guess it ends here.
2021-12-04 16:23:21 -05:00
Sally Coolatta
8cbaad4e4f Merge branch 'new-menus' into profiles 2021-12-04 15:47:11 -05:00
James R
74288a4de1 Fix compiling errors
- Replace itoa with sprintf (itoa is a nonstandard
function).
- Guard one instance of Discord Rich Presence.
2021-12-03 14:59:22 -08:00
Sally Coolatta
f17b948491 Update how input is handled in menus to use key bindings
VERY broken right now, it lost the delay between key presses. Kinda already sick of the reorganization needed though
2021-11-29 12:02:56 -05:00