Skip to content

Commit

Permalink
Fix docs for atlas + slicing support (#12325)
Browse files Browse the repository at this point in the history
# Objective

The docs say that atlas and slicing are incompatible, but they are now
compatible after #12059.

## Solution

Update the docs.
  • Loading branch information
benfrankel authored Mar 5, 2024
1 parent 212dc60 commit e9671f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions crates/bevy_sprite/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ use bevy_transform::components::{GlobalTransform, Transform};
///
/// # Extra behaviours
///
/// You may add the following components to enable additional behaviours:
/// You may add one or both of the following components to enable additional behaviours:
/// - [`ImageScaleMode`](crate::ImageScaleMode) to enable either slicing or tiling of the texture
/// - [`TextureAtlas`] to draw specific sections of the texture
///
/// Note that `ImageScaleMode` is currently not compatible with `TextureAtlas`.
/// - [`TextureAtlas`] to draw a specific section of the texture
#[derive(Bundle, Clone, Debug, Default)]
pub struct SpriteBundle {
/// Specifies the rendering properties of the sprite, such as color tint and flip.
Expand Down
12 changes: 4 additions & 8 deletions crates/bevy_ui/src/node_bundles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,9 @@ impl Default for NodeBundle {
///
/// # Extra behaviours
///
/// You may add the following components to enable additional behaviours:
/// You may add one or both of the following components to enable additional behaviours:
/// - [`ImageScaleMode`](bevy_sprite::ImageScaleMode) to enable either slicing or tiling of the texture
/// - [`TextureAtlas`] to draw specific sections of the texture
///
/// Note that `ImageScaleMode` is currently not compatible with `TextureAtlas`.
/// - [`TextureAtlas`] to draw a specific section of the texture
#[derive(Bundle, Debug, Default)]
pub struct ImageBundle {
/// Describes the logical size of the node
Expand Down Expand Up @@ -298,11 +296,9 @@ where
///
/// # Extra behaviours
///
/// You may add the following components to enable additional behaviours:
/// You may add one or both of the following components to enable additional behaviours:
/// - [`ImageScaleMode`](bevy_sprite::ImageScaleMode) to enable either slicing or tiling of the texture
/// - [`TextureAtlas`] to draw specific section of the texture
///
/// Note that `ImageScaleMode` is currently not compatible with `TextureAtlas`.
/// - [`TextureAtlas`] to draw a specific section of the texture
#[derive(Bundle, Clone, Debug)]
pub struct ButtonBundle {
/// Describes the logical size of the node
Expand Down

0 comments on commit e9671f3

Please sign in to comment.