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

Rename Input to ButtonInput #10859

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

matiqo15
Copy link
Member

@matiqo15 matiqo15 commented Dec 3, 2023

Objective

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.

@ItsDoot
Copy link
Contributor

ItsDoot commented Dec 3, 2023

What about DigitalInput instead? Slightly more succinct.

@ItsDoot ItsDoot added A-Input Player input via keyboard, mouse, gamepad, and more C-Code-Quality A section of code that is hard to understand or change labels Dec 4, 2023
@Nilirad
Copy link
Contributor

Nilirad commented Dec 4, 2023

What about DigitalInput instead? Slightly more succinct.

Would BinaryInput be more immediate? 🤔

@Nilirad Nilirad added the C-Breaking-Change A breaking change to Bevy's public API that needs to be noted in a migration guide label Dec 4, 2023
@matiqo15
Copy link
Member Author

matiqo15 commented Dec 4, 2023

Would BinaryInput be more immediate? 🤔

I think DigitalInput would be less misleading.

@alice-i-cecile
Copy link
Member

I like Pressable much better: it more clearly captures the intent and is more approachable for beginners.

@alice-i-cecile
Copy link
Member

I would like a Pressable marker trait to go with this eventually, but that can wait until it's better motivated. See Leafwing-Studios/leafwing-input-manager#321 for the broader context there.

@stepancheg
Copy link
Contributor

Maybe ButtonInput. Not precisely correct, but conveys the meaning. My 2 cents.

@Nilirad
Copy link
Contributor

Nilirad commented Dec 5, 2023

I would like a Pressable marker trait to go with this eventually, but that can wait until it's better motivated. See Leafwing-Studios/leafwing-input-manager#321 for the broader context there.

Do you mean something like #10855?

@ickshonpe
Copy link
Contributor

Maybe ButtonInput. Not precisely correct, but conveys the meaning. My 2 cents.

Much prefer this, PressableInput is a bit ugly and DigitalInput is too obscure.

@alice-i-cecile
Copy link
Member

Let's go with ButtonInput then and get this merged :)

@alice-i-cecile alice-i-cecile changed the title Rename Input to PressableInput Rename Input to ButtonInput Dec 6, 2023
Copy link
Contributor

@Nilirad Nilirad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

input.rs should be renamed. For the rest, it looks ok to me.

@matiqo15 matiqo15 requested a review from Nilirad December 6, 2023 18:24
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Dec 6, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Dec 6, 2023
Merged via the queue into bevyengine:main with commit 1f97717 Dec 6, 2023
23 checks passed
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-Breaking-Change 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 S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Input name is too generic
6 participants