Skip to content

[3.x] Add ability to automatically choose a joystick button or axis...#47574

Open
BuzzBurrowes wants to merge 4 commits intogodotengine:3.xfrom
BuzzBurrowes:joystick_input_autodetect
Open

[3.x] Add ability to automatically choose a joystick button or axis...#47574
BuzzBurrowes wants to merge 4 commits intogodotengine:3.xfrom
BuzzBurrowes:joystick_input_autodetect

Conversation

@BuzzBurrowes
Copy link
Copy Markdown

@BuzzBurrowes BuzzBurrowes commented Apr 2, 2021

... when modifying a project's input settings

image

If you click the CheckButton "capture", you can then wiggle a joystick (or press a button) and the selection will automatically change to that axis (or button).

@Calinou
Copy link
Copy Markdown
Member

Calinou commented Apr 2, 2021

This is a nice feature, but shouldn't this be enabled automatically as long as the dialog is open? It seems a bit annoying that you have to check a CheckButton every time you wish to capture a joystick button or axis. There could be a label to denote that the user can move the joystick or press a button on it to set the value automatically.

Also, pull requests should be opened against the master branch unless they can't apply there for some reason. Note that the master branch has a revamped project settings and input map editor, so you'll have to remake the pull request from scratch from that branch.
Feel free to keep this 3.x pull request open in the meantime, but we'll need this feature to also be present on master if we decide to merge it in 3.x.

Comment thread editor/project_settings_editor.cpp Outdated
@BuzzBurrowes
Copy link
Copy Markdown
Author

This is a nice feature, but shouldn't this be enabled automatically as long as the dialog is open? It seems a bit annoying that you have to check a CheckButton every time you wish to capture a joystick button or axis. There could be a label to denote that the user can move the joystick or press a button on it to set the value automatically.

I actually had it that way to start with, but the downside is that if you are in some situation where you have extraneous input, and want/need to edit the field manually, it keeps changing out from under you. Maybe too much of a corner case to worry about, but if you do end up in that situation it will be pretty annoying.

I could go either way. Just explaining my rationale.

@BuzzBurrowes
Copy link
Copy Markdown
Author

Feel free to keep this 3.x pull request open in the meantime, but we'll need this feature to also be present on master if we decide to merge it in 3.x.

Was looking at submitting it against the master originally, but it looks like the master is so different it isn't going to be a trivial port. I'll take a look.

@BuzzBurrowes
Copy link
Copy Markdown
Author

It just occurred to me that I could make this setting "sticky". It seems too trivial to make it some editor setting, but I could have it turned off when you open the settings dialog. Then, when you turn it on once, it remembers it was on for the duration of that settings edit "session". You can turn it back off manually, or when you close the settings and reopen them it could be set back off again. Open to options.

@BuzzBurrowes
Copy link
Copy Markdown
Author

Feel free to keep this 3.x pull request open in the meantime, but we'll need this feature to also be present on master if we decide to merge it in 3.x.

Was looking at submitting it against the master originally, but it looks like the master is so different it isn't going to be a trivial port. I'll take a look.

Turns out this type of feature is already in 4.0, so I think it is only useful in 3.x.

BuzzBurrowes and others added 3 commits April 2, 2021 15:57
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
@EricEzaM
Copy link
Copy Markdown
Contributor

EricEzaM commented Apr 8, 2021

For reference, this was added to master in #44181

@Chaosus Chaosus modified the milestones: 3.4, 3.5 Nov 8, 2021
@akien-mga akien-mga force-pushed the 3.x branch 2 times, most recently from 71cb8d3 to c58391c Compare January 6, 2022 22:40
@akien-mga akien-mga modified the milestones: 3.5, 3.x Jul 2, 2022
@Nintorch Nintorch changed the title Add ability to automatically choose a joystick button or axis... [3.x] Add ability to automatically choose a joystick button or axis... Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants