Skip to content

Remove YAxisOrientation from bevy_text #19077

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

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

Conversation

ickshonpe
Copy link
Contributor

Objective

Been looking for simplifications in the text systems as part of the text input changes.

This enum isn't very helpful I think. We can remove it and the associated parameters and instead just negate the glyph's y-offsets in extract_text2d_sprite.

Solution

Remove the YAxisOrientation enum and parameters.
Queue text sprites relative to the top-left in extract_text2d_sprite and negate the glyph's y-offset.

Testing

The text2d example can be used for testing:

cargo run --example text2d

ickshonpe added 3 commits May 5, 2025 16:58
In `extract_text2d_sprite` use coords relative to the top left corner and reverse y-axis.
@ickshonpe ickshonpe added A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change A-Text Rendering and layout for characters D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward A-Rendering Drawing game state to the screen and removed A-UI Graphical user interfaces, styles, layouts, and widgets labels May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen A-Text Rendering and layout for characters C-Code-Quality A section of code that is hard to understand or change D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants