Corruption-of-Champions-Mod icon indicating copy to clipboard operation
Corruption-of-Champions-Mod copied to clipboard

[Enhancement] Controller Support

Open ElsaTheHobo opened this issue 7 years ago • 6 comments

Issue type

  • [ ] Bug report
  • [x] Feature request
  • [ ] Other

Overview

Add simple controller support for the game, or at least allow mapping controller buttons and using keys other than tab to select buttons.

Controls I came up with:

  • D-pad/left analog stick moves the button selection
  • Select button toggles whether the cursor is active in the menu space (top row) or the main button space (bottom three rows)
  • A button is click button
  • B button is no/back/leave
  • Start button is the menu
  • Left bumper is yes, right bumper is no
  • X button is continue

Game version

Latest GitHub version (Last commit 4024e25)

ElsaTheHobo avatar Feb 03 '18 01:02 ElsaTheHobo

Would keyboard support be a good first attempt? eg a kind of completely mouse-less experience? I believe if we can get something like that working you will be able to remap the controller to the defined keyboard keys.

jfmherokiller avatar Feb 07 '18 01:02 jfmherokiller

There already is almost full keyboard support, the only thing really missing is arrow key support and the ability to remap to controller input (it doesn't detect my Xbox controller last I tried). All the stuff I listed is kinda secondary to that.

ElsaTheHobo avatar Feb 07 '18 02:02 ElsaTheHobo

There is a GameInput class available in AIR for gamepad input, but AFAIK it's rather buggy. I'm not sure gamepads can be detected otherwise, and moving entirely to AIR raises other problems.

I'd suggest using gamepad to keyboard software, as of current.

Oxdeception avatar Feb 07 '18 11:02 Oxdeception

@Oxdeception thats exactly what i was suggesting i think the only thing not hooked up to be controllable via the keyboard is maybe the scrollbar ui component in my latest pull request

jfmherokiller avatar Feb 07 '18 17:02 jfmherokiller

@jfmherokiller TextFields default scroll with pgup and pgdown. It's not smooth, but it's functional.

Oxdeception avatar Feb 07 '18 22:02 Oxdeception

ok good because im talking about pull request #1148 which kind of changes the ui a bit

jfmherokiller avatar Feb 07 '18 22:02 jfmherokiller