bevy/crates
Carter Anderson 0ebcf745cd
Move TextureAtlas into UiImage and remove impl Component for TextureAtlas (#16072)
# Objective

Fixes #16064

## Solution

- Add TextureAtlas to `UiImage::texture_atlas`
- Add `TextureAtlas::from_atlas_image` for parity with `Sprite`
- Rename `UiImage::texture` to `UiImage::image` for parity with `Sprite`
- Port relevant implementations and uses
- Remove `derive(Component)` for `TextureAtlas`

---

## Migration Guide

Before:
```rust
commands.spawn((
  UiImage::new(image),
  TextureAtlas { index, layout },
));
```

After:
```rust
commands.spawn(UiImage::from_atlas_image(image, TextureAtlas { index, layout }));
```

Before:
```rust
commands.spawn(UiImage {
    texture: some_image,
    ..default()
})
```

After:
```rust
commands.spawn(UiImage {
    image: some_image,
    ..default()
})
```
2024-10-24 23:33:24 +02:00
..
bevy_a11y Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_animation Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_app Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_asset Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_audio Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_color Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_core Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_core_pipeline Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_derive Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_dev_tools Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_diagnostic Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_dylib Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_ecs Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_encase_derive Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_gilrs Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_gizmos Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_gltf Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_hierarchy Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_image Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_input Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_internal Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_log Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_macro_utils Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_math Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_mesh Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_mikktspace Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_pbr Meshlet fill cluster buffers rewritten (#15955) 2024-10-24 23:33:23 +02:00
bevy_picking Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_ptr Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_reflect Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_remote Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_render Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_scene Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_sprite Move TextureAtlas into UiImage and remove impl Component for TextureAtlas (#16072) 2024-10-24 23:33:24 +02:00
bevy_state Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_tasks Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_text Use CosmicFontSystem in public bevy_text APIs and remove cosmic_text re-export (#16063) 2024-10-24 23:33:23 +02:00
bevy_time Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_transform Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_ui Move TextureAtlas into UiImage and remove impl Component for TextureAtlas (#16072) 2024-10-24 23:33:24 +02:00
bevy_utils Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_window Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00
bevy_winit Release 0.15.0-rc.1 2024-10-22 22:44:41 +02:00