Skip to content

[Merged by Bors] - Rename ElementState to ButtonState#4314

Closed
ghost wants to merge 2 commits intomainfrom
unknown repository
Closed

[Merged by Bors] - Rename ElementState to ButtonState#4314
ghost wants to merge 2 commits intomainfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Mar 24, 2022

Objective

Solution

  • Rename ElementState to ButtonState

Reasons

Changelog

Changed

  • The ElementState type received a rename and is now called ButtonState.

Migration Guide

  • The ElementState type received a rename and is now called ButtonState. To migrate you just have to change every occurrence of ElementState to ButtonState.

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Mar 24, 2022
@ghost ghost added A-Input Player input via keyboard, mouse, gamepad, and more M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide and removed S-Needs-Triage This issue needs to be labelled labels Mar 24, 2022
@alice-i-cecile
Copy link
Member

I like this rename a lot. Eventually, I think we should unify the gamepad buttons to use this too, but that's a story for another PR.

@ghost ghost changed the title bevy_input: Rename ElementState to ButtonState Rename ElementState to ButtonState Mar 24, 2022
Copy link
Contributor

@Weibye Weibye left a comment

Choose a reason for hiding this comment

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

👍

@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Apr 24, 2022
# Objective

- Part of the splitting process of #3692.

## Solution

- Rename `ElementState` to `ButtonState`

## Reasons

- The old name was too generic.
- If something can be pressed it is automatically button-like (thanks to @alice-i-cecile for bringing it up in #3692).
- The reason it is called `ElementState` is because that's how `winit` calls it.
- It is used to define if a keyboard or mouse **button** is pressed or not.
- Discussion in #3692.

## Changelog

### Changed

- The `ElementState` type received a rename and is now called `ButtonState`.

## Migration Guide

- The `ElementState` type received a rename and is now called `ButtonState`. To migrate you just have to change every occurrence of `ElementState` to `ButtonState`.

Co-authored-by: KDecay <KDecayMusic@protonmail.com>
@bors bors bot changed the title Rename ElementState to ButtonState [Merged by Bors] - Rename ElementState to ButtonState Apr 24, 2022
@bors bors bot closed this Apr 24, 2022
exjam pushed a commit to exjam/bevy that referenced this pull request May 22, 2022
# Objective

- Part of the splitting process of bevyengine#3692.

## Solution

- Rename `ElementState` to `ButtonState`

## Reasons

- The old name was too generic.
- If something can be pressed it is automatically button-like (thanks to @alice-i-cecile for bringing it up in bevyengine#3692).
- The reason it is called `ElementState` is because that's how `winit` calls it.
- It is used to define if a keyboard or mouse **button** is pressed or not.
- Discussion in bevyengine#3692.

## Changelog

### Changed

- The `ElementState` type received a rename and is now called `ButtonState`.

## Migration Guide

- The `ElementState` type received a rename and is now called `ButtonState`. To migrate you just have to change every occurrence of `ElementState` to `ButtonState`.

Co-authored-by: KDecay <KDecayMusic@protonmail.com>
@ghost ghost deleted the rename_element_state branch August 7, 2022 08:27
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

- Part of the splitting process of bevyengine#3692.

## Solution

- Rename `ElementState` to `ButtonState`

## Reasons

- The old name was too generic.
- If something can be pressed it is automatically button-like (thanks to @alice-i-cecile for bringing it up in bevyengine#3692).
- The reason it is called `ElementState` is because that's how `winit` calls it.
- It is used to define if a keyboard or mouse **button** is pressed or not.
- Discussion in bevyengine#3692.

## Changelog

### Changed

- The `ElementState` type received a rename and is now called `ButtonState`.

## Migration Guide

- The `ElementState` type received a rename and is now called `ButtonState`. To migrate you just have to change every occurrence of `ElementState` to `ButtonState`.

Co-authored-by: KDecay <KDecayMusic@protonmail.com>
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 M-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 this pull request may close these issues.

2 participants