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 "focus" in bevy_picking to "hover" #16872

Merged
merged 6 commits into from
Dec 24, 2024

Conversation

alice-i-cecile
Copy link
Member

Objective

With the introduction of bevy_input_focus, the uses of "focus" in bevy_picking are quite confusing and make searching hard.

Users will intuitively think these concepts are related, but they actually aren't.

Solution

Rename / rephrase all uses of "focus" in bevy_picking to refer to "hover", since this is ultimately related to creating the HoverMap.

Migration Guide

Various terms related to "focus" in bevy_picking have been renamed to refer to "hover" to avoid confusion with bevy_input_focus. In particular:

  • The update_focus system has been renamed to generate_hovermap
  • PickSet::Focus and PostFocus have been renamed to Hover and PostHover
  • The bevy_picking::focus module has been renamed to bevy_picking::hover
  • The is_focus_enabled field on PickingPlugin has been renamed to is_hover_enabled
  • The focus_should_run run condition has been renamed to hover_should_run

@alice-i-cecile alice-i-cecile added C-Code-Quality A section of code that is hard to understand or change C-Usability A targeted quality-of-life change that makes Bevy easier to use M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward A-Picking Pointing at and selecting objects of all sorts labels Dec 17, 2024
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Dec 17, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Dec 24, 2024
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Dec 24, 2024
Merged via the queue into bevyengine:main with commit 48fe2a6 Dec 24, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Picking Pointing at and selecting objects of all sorts C-Code-Quality A section of code that is hard to understand or change C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide 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.

3 participants