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

Add Text2d picking backend #16886

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

coreh
Copy link
Contributor

@coreh coreh commented Dec 18, 2024

Objective

  • This PR adds support for picking Text2d.

Solution

  • Introduce a new feature flag, bevy_text2d_picking_backend, and add all the required plumbing;
  • Extend the TextPlugin struct to include a add_picking setting;
  • Port over the existing sprite picking backend to bevy_text, using TextLayoutInfo for the bounds;
  • Add a text2d_picking example.

Note: I'm deliberately not calling the feature bevy_text_picking_backend, to avoid misleading people into thinking this might be used for UI Text.

Testing

  • Did you test these changes? If so, how? Yes, by running the text2d_picking example.
  • Are there any parts that need more testing? Not that I'm aware of
  • How can other people (reviewers) test your changes? Is there anything specific they need to know? Run the text2d_picking example.
  • If relevant, what platforms did you test these changes on, and are there any important ones you can't test? macOS

Copy link
Contributor

The generated examples/README.md is out of sync with the example metadata in Cargo.toml or the example readme template. Please run cargo run -p build-templated-pages -- update examples to update it, and commit the file change.

@alice-i-cecile alice-i-cecile added A-Text Rendering and layout for characters D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward A-Picking Pointing at and selecting objects of all sorts X-Uncontroversial This work is generally agreed upon labels Dec 18, 2024
Copy link
Contributor

You added a new feature but didn't update the readme. Please run cargo run -p build-templated-pages -- update features to update it, and commit the file change.

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 A-Text Rendering and layout for characters D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward X-Uncontroversial This work is generally agreed upon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants