bevy/crates/bevy_text/src
JoJoJet b8263b55fb Support system.in_schedule() and system.on_startup() (#7790)
# Objective

Support the following syntax for adding systems:

```rust
App::new()
    .add_system(setup.on_startup())
    .add_systems((
        show_menu.in_schedule(OnEnter(GameState::Paused)),
        menu_ssytem.in_set(OnUpdate(GameState::Paused)),
        hide_menu.in_schedule(OnExit(GameState::Paused)),
    ))
```

## Solution

Add the traits `IntoSystemAppConfig{s}`, which provide the extension methods necessary for configuring which schedule a system belongs to. These extension methods return `IntoSystemAppConfig{s}`, which `App::add_system{s}` uses to choose which schedule to add systems to.

---

## Changelog

+ Added the extension methods `in_schedule(label)` and  `on_startup()` for configuring the schedule a system belongs to.

## Future Work

* Replace all uses of `add_startup_system` in the engine.
* Deprecate this method
2023-02-24 18:33:55 +00:00
..
error.rs Remove TextError::ExceedMaxTextAtlases(usize) variant (#6796) 2022-12-05 23:23:16 +00:00
font.rs small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
font_atlas.rs Replace old renderer with new renderer (#3312) 2021-12-14 03:58:23 +00:00
font_atlas_set.rs Warn instead of erroring when max_font_atlases is exceeded (#6673) 2022-11-25 23:49:25 +00:00
font_loader.rs Add support for OTF fonts (#1200) 2021-01-03 12:10:23 -08:00
glyph_brush.rs Allow users of Text/TextBundle to choose from glyph_brush_layout's BuiltInLineBreaker options. (#7283) 2023-01-21 00:17:11 +00:00
lib.rs Support system.in_schedule() and system.on_startup() (#7790) 2023-02-24 18:33:55 +00:00
pipeline.rs Allow users of Text/TextBundle to choose from glyph_brush_layout's BuiltInLineBreaker options. (#7283) 2023-01-21 00:17:11 +00:00
text.rs Allow users of Text/TextBundle to choose from glyph_brush_layout's BuiltInLineBreaker options. (#7283) 2023-01-21 00:17:11 +00:00
text2d.rs Fix some more typos (#7767) 2023-02-20 23:36:28 +00:00