bevy/examples/input
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
..
char_input_events.rs Fix inconsistency in KeyboardInput examples to match migration guide (#14185) 2024-07-15 15:03:48 +00:00
gamepad_input_events.rs Implement gamepads as entities (#12770) 2024-09-27 20:07:20 +00:00
gamepad_input.rs Implement gamepads as entities (#12770) 2024-09-27 20:07:20 +00:00
gamepad_rumble.rs Implement gamepads as entities (#12770) 2024-09-27 20:07:20 +00:00
keyboard_input_events.rs Refactor EventReader::iter to read (#9631) 2023-08-30 14:20:03 +00:00
keyboard_input.rs Update winit dependency to 0.29 (#10702) 2023-12-21 07:40:47 +00:00
keyboard_modifiers.rs Update winit dependency to 0.29 (#10702) 2023-12-21 07:40:47 +00:00
mouse_grab.rs Add custom cursors (#14284) 2024-08-12 15:49:03 +00:00
mouse_input_events.rs rename touchpad to gesture, and add new gestures (#13660) 2024-06-04 12:44:25 +00:00
mouse_input.rs Mouse input accumulation (#14044) 2024-07-01 14:27:21 +00:00
text_input.rs split up TextStyle (#15857) 2024-10-13 17:06:22 +00:00
touch_input_events.rs Refactor EventReader::iter to read (#9631) 2023-08-30 14:20:03 +00:00
touch_input.rs Non-breaking change* from UK spellings to US (#8291) 2023-04-08 16:22:46 +00:00