4
4
use crate :: widget:: TextFlags ;
5
5
use crate :: {
6
6
widget:: { Button , UiImageSize } ,
7
- BackgroundColor , BorderColor , ContentSize , FocusPolicy , Interaction , Node , Style , UiImage ,
8
- UiMaterial , ZIndex ,
7
+ BackgroundColor , Border , BorderColor , BorderRadius , ContentSize , FocusPolicy , Interaction ,
8
+ Node , Style , UiImage , UiMaterial , ZIndex ,
9
9
} ;
10
10
use bevy_asset:: Handle ;
11
11
use bevy_ecs:: bundle:: Bundle ;
@@ -54,6 +54,10 @@ pub struct NodeBundle {
54
54
pub view_visibility : ViewVisibility ,
55
55
/// Indicates the depth at which the node should appear in the UI
56
56
pub z_index : ZIndex ,
57
+ /// Describes the border radius of the node
58
+ pub border_radius : BorderRadius ,
59
+ /// Describes the visual properties of the node's border
60
+ pub border : Border ,
57
61
}
58
62
59
63
impl Default for NodeBundle {
@@ -71,6 +75,8 @@ impl Default for NodeBundle {
71
75
inherited_visibility : Default :: default ( ) ,
72
76
view_visibility : Default :: default ( ) ,
73
77
z_index : Default :: default ( ) ,
78
+ border_radius : Default :: default ( ) ,
79
+ border : Default :: default ( ) ,
74
80
}
75
81
}
76
82
}
@@ -119,6 +125,10 @@ pub struct ImageBundle {
119
125
pub view_visibility : ViewVisibility ,
120
126
/// Indicates the depth at which the node should appear in the UI
121
127
pub z_index : ZIndex ,
128
+ /// Describes the border radius of the node
129
+ pub border_radius : BorderRadius ,
130
+ /// Describes the visual properties of the node's border
131
+ pub border : Border ,
122
132
}
123
133
124
134
/// A UI node that is a texture atlas sprite
@@ -390,6 +400,10 @@ pub struct MaterialNodeBundle<M: UiMaterial> {
390
400
pub view_visibility : ViewVisibility ,
391
401
/// Indicates the depth at which the node should appear in the UI
392
402
pub z_index : ZIndex ,
403
+ /// Describes the border radius of the node
404
+ pub border_radius : BorderRadius ,
405
+ /// Describes the visual properties of the node's border
406
+ pub border : Border ,
393
407
}
394
408
395
409
impl < M : UiMaterial > Default for MaterialNodeBundle < M > {
@@ -405,6 +419,8 @@ impl<M: UiMaterial> Default for MaterialNodeBundle<M> {
405
419
inherited_visibility : Default :: default ( ) ,
406
420
view_visibility : Default :: default ( ) ,
407
421
z_index : Default :: default ( ) ,
422
+ border_radius : Default :: default ( ) ,
423
+ border : Default :: default ( ) ,
408
424
}
409
425
}
410
426
}
0 commit comments