bevy/crates/bevy_dev_tools/src
ickshonpe 6f7d0e5725
split up TextStyle (#15857)
# Objective

Currently text is recomputed unnecessarily on any changes to its color,
which is extremely expensive.

## Solution
Split up `TextStyle` into two separate components `TextFont` and
`TextColor`.

## Testing

I added this system to `many_buttons`:
```rust
fn set_text_colors_changed(mut colors: Query<&mut TextColor>) {
    for mut text_color in colors.iter_mut() {
        text_color.set_changed();
    }
}
```

reports ~4fps on main, ~50fps with this PR.

## Migration Guide
`TextStyle` has been renamed to `TextFont` and its `color` field has
been moved to a separate component named `TextColor` which newtypes
`Color`.
2024-10-13 17:06:22 +00:00
..
ci_testing Rename App/World::observe to add_observer, EntityWorldMut::observe_entity to observe. (#15754) 2024-10-09 15:39:29 +00:00
ui_debug_overlay Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
fps_overlay.rs split up TextStyle (#15857) 2024-10-13 17:06:22 +00:00
lib.rs plugin_group! macro (adopted) (#14339) 2024-07-16 01:14:33 +00:00
states.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00