Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input name is too generic #10853

Closed
Nilirad opened this issue Dec 3, 2023 · 0 comments · Fixed by #10859
Closed

Input name is too generic #10853

Nilirad opened this issue Dec 3, 2023 · 0 comments · Fixed by #10859
Labels
A-Input Player input via keyboard, mouse, gamepad, and more C-Code-Quality A section of code that is hard to understand or change M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide

Comments

@Nilirad
Copy link
Contributor

Nilirad commented Dec 3, 2023

bevy_input contains a struct called Input which refers to any kind of "pressable input". The problem is that Input is too generic, since there are other kinds of input like axis input, that do not fit into there, misleading users that have not yet read the documentation.
Input should be renamed to something more specific.

This may have the drawback of a longer name, but personally I don't mind since it's not a thing that's used everywhere, so it's worth it to be more specific IMO.

@Nilirad Nilirad added C-Docs An addition or correction to our documentation A-Input Player input via keyboard, mouse, gamepad, and more M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide C-Code-Quality A section of code that is hard to understand or change and removed C-Docs An addition or correction to our documentation labels Dec 3, 2023
github-merge-queue bot pushed a commit that referenced this issue Dec 6, 2023
# Objective

- Resolves #10853 

## Solution

- ~~Changed the name of `Input` struct to `PressableInput`.~~
- Changed the name of `Input` struct to `ButtonInput`.

## Migration Guide

- Breaking Change: Users need to rename `Input` to `ButtonInput` in
their projects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Input Player input via keyboard, mouse, gamepad, and more C-Code-Quality A section of code that is hard to understand or change M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant