1
- #![ allow( deprecated) ]
2
-
3
1
//! This module contains basic node bundles used to build UIs
4
2
5
3
#[ cfg( feature = "bevy_text" ) ]
@@ -14,7 +12,6 @@ use bevy_asset::Handle;
14
12
use bevy_color:: Color ;
15
13
use bevy_ecs:: bundle:: Bundle ;
16
14
use bevy_render:: view:: { InheritedVisibility , ViewVisibility , Visibility } ;
17
- use bevy_sprite:: TextureAtlas ;
18
15
#[ cfg( feature = "bevy_text" ) ]
19
16
use bevy_text:: {
20
17
BreakLineOn , CosmicBuffer , JustifyText , Text , TextLayoutInfo , TextSection , TextStyle ,
@@ -67,7 +64,7 @@ pub struct NodeBundle {
67
64
///
68
65
/// You may add one or both of the following components to enable additional behaviours:
69
66
/// - [`ImageScaleMode`](bevy_sprite::ImageScaleMode) to enable either slicing or tiling of the texture
70
- /// - [`TextureAtlas`] to draw a specific section of the texture
67
+ /// - [`TextureAtlas`](bevy_sprite::TextureAtlas) to draw a specific section of the texture
71
68
#[ derive( Bundle , Debug , Default ) ]
72
69
pub struct ImageBundle {
73
70
/// Describes the logical size of the node
@@ -110,56 +107,6 @@ pub struct ImageBundle {
110
107
pub z_index : ZIndex ,
111
108
}
112
109
113
- /// A UI node that is a texture atlas sprite
114
- ///
115
- /// # Extra behaviours
116
- ///
117
- /// You may add the following components to enable additional behaviours
118
- /// - [`ImageScaleMode`](bevy_sprite::ImageScaleMode) to enable either slicing or tiling of the texture
119
- ///
120
- /// This bundle is identical to [`ImageBundle`] with an additional [`TextureAtlas`] component.
121
- #[ deprecated(
122
- since = "0.14.0" ,
123
- note = "Use `TextureAtlas` alongside `ImageBundle` instead"
124
- ) ]
125
- #[ derive( Bundle , Debug , Default ) ]
126
- pub struct AtlasImageBundle {
127
- /// Describes the logical size of the node
128
- pub node : Node ,
129
- /// Styles which control the layout (size and position) of the node and its children
130
- /// In some cases these styles also affect how the node drawn/painted.
131
- pub style : Style ,
132
- /// The calculated size based on the given image
133
- pub calculated_size : ContentSize ,
134
- /// The image of the node
135
- pub image : UiImage ,
136
- /// A handle to the texture atlas to use for this Ui Node
137
- pub texture_atlas : TextureAtlas ,
138
- /// Whether this node should block interaction with lower nodes
139
- pub focus_policy : FocusPolicy ,
140
- /// The size of the image in pixels
141
- ///
142
- /// This component is set automatically
143
- pub image_size : UiImageSize ,
144
- /// The transform of the node
145
- ///
146
- /// This component is automatically managed by the UI layout system.
147
- /// To alter the position of the `AtlasImageBundle`, use the properties of the [`Style`] component.
148
- pub transform : Transform ,
149
- /// The global transform of the node
150
- ///
151
- /// This component is automatically updated by the [`TransformPropagate`](`bevy_transform::TransformSystem::TransformPropagate`) systems.
152
- pub global_transform : GlobalTransform ,
153
- /// Describes the visibility properties of the node
154
- pub visibility : Visibility ,
155
- /// Inherited visibility of an entity.
156
- pub inherited_visibility : InheritedVisibility ,
157
- /// Algorithmically-computed indication of whether an entity is visible and should be extracted for rendering
158
- pub view_visibility : ViewVisibility ,
159
- /// Indicates the depth at which the node should appear in the UI
160
- pub z_index : ZIndex ,
161
- }
162
-
163
110
#[ cfg( feature = "bevy_text" ) ]
164
111
/// A UI node that is text
165
112
///
@@ -269,7 +216,7 @@ where
269
216
///
270
217
/// You may add one or both of the following components to enable additional behaviours:
271
218
/// - [`ImageScaleMode`](bevy_sprite::ImageScaleMode) to enable either slicing or tiling of the texture
272
- /// - [`TextureAtlas`] to draw a specific section of the texture
219
+ /// - [`TextureAtlas`](bevy_sprite::TextureAtlas) to draw a specific section of the texture
273
220
#[ derive( Bundle , Clone , Debug ) ]
274
221
pub struct ButtonBundle {
275
222
/// Describes the logical size of the node
0 commit comments