bevy/crates/bevy_text/src
Al M bd68ba1c3c make TextLayoutInfo a Component (#4460)
# Objective

Make `TextLayoutInfo` more accessible as a component, rather than internal to `TextPipeline`. I am working on a plugin that manipulates these and there is no (mutable) access to them right now.

## Solution

This changes `TextPipeline::queue_text` to return `TextLayoutInfo`'s rather than storing them in a map internally. `text2d_system` and `text_system` now take the returned `TextLayoutInfo` and store it as a component of the entity. I considered adding an accessor to `TextPipeline` (e.g. `get_glyphs_mut`) but this seems like it might be a little faster, and also has the added benefit of cleaning itself up when entities are removed. Right now nothing is ever removed from the glyphs map.

## Changelog

Removed `DefaultTextPipeline`. `TextPipeline` no longer has a generic key type. `TextPipeline::queue_text` returns `TextLayoutInfo` directly.

## Migration Guide

This might break a third-party crate? I could restore the orginal TextPipeline API as a wrapper around what's in this PR.
2022-09-06 20:03:40 +00:00
..
error.rs
font_atlas_set.rs Updated glam to 0.21. (#5142) 2022-07-03 19:55:33 +00:00
font_atlas.rs Replace old renderer with new renderer (#3312) 2021-12-14 03:58:23 +00:00
font_loader.rs
font.rs small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
glyph_brush.rs Move Size to bevy_ui (#4285) 2022-04-25 13:54:46 +00:00
lib.rs make TextLayoutInfo a Component (#4460) 2022-09-06 20:03:40 +00:00
pipeline.rs make TextLayoutInfo a Component (#4460) 2022-09-06 20:03:40 +00:00
text2d.rs make TextLayoutInfo a Component (#4460) 2022-09-06 20:03:40 +00:00
text.rs bevy_reflect: Update enum derives (#5473) 2022-08-02 22:40:29 +00:00