@@ -86,7 +86,7 @@ mod splash {
86
86
. spawn_bundle ( ImageBundle {
87
87
style : Style {
88
88
// This will center the logo
89
- margin : Rect :: all ( Val :: Auto ) ,
89
+ margin : UiRect :: all ( Val :: Auto ) ,
90
90
// This will set the logo to be 200px wide, and auto adjust its height
91
91
size : Size :: new ( Val :: Px ( 200.0 ) , Val :: Auto ) ,
92
92
..default ( )
@@ -150,7 +150,7 @@ mod game {
150
150
. spawn_bundle ( NodeBundle {
151
151
style : Style {
152
152
// This will center the current node
153
- margin : Rect :: all ( Val :: Auto ) ,
153
+ margin : UiRect :: all ( Val :: Auto ) ,
154
154
// This will display its children in a column, from top to bottom. Unlike
155
155
// in Flexbox, Bevy origin is on bottom left, so the vertical axis is reversed
156
156
flex_direction : FlexDirection :: ColumnReverse ,
@@ -168,7 +168,7 @@ mod game {
168
168
// Display two lines of text, the second one with the current settings
169
169
parent. spawn_bundle ( TextBundle {
170
170
style : Style {
171
- margin : Rect :: all ( Val :: Px ( 50.0 ) ) ,
171
+ margin : UiRect :: all ( Val :: Px ( 50.0 ) ) ,
172
172
..default ( )
173
173
} ,
174
174
text : Text :: with_section (
@@ -184,7 +184,7 @@ mod game {
184
184
} ) ;
185
185
parent. spawn_bundle ( TextBundle {
186
186
style : Style {
187
- margin : Rect :: all ( Val :: Px ( 50.0 ) ) ,
187
+ margin : UiRect :: all ( Val :: Px ( 50.0 ) ) ,
188
188
..default ( )
189
189
} ,
190
190
text : Text {
@@ -396,7 +396,7 @@ mod menu {
396
396
// Common style for all buttons on the screen
397
397
let button_style = Style {
398
398
size : Size :: new ( Val :: Px ( 250.0 ) , Val :: Px ( 65.0 ) ) ,
399
- margin : Rect :: all ( Val :: Px ( 20.0 ) ) ,
399
+ margin : UiRect :: all ( Val :: Px ( 20.0 ) ) ,
400
400
justify_content : JustifyContent :: Center ,
401
401
align_items : AlignItems :: Center ,
402
402
..default ( )
@@ -406,7 +406,7 @@ mod menu {
406
406
// This takes the icons out of the flexbox flow, to be positionned exactly
407
407
position_type : PositionType :: Absolute ,
408
408
// The icon will be close to the left border of the button
409
- position : Rect {
409
+ position : UiRect {
410
410
left : Val :: Px ( 10.0 ) ,
411
411
right : Val :: Auto ,
412
412
top : Val :: Auto ,
@@ -423,7 +423,7 @@ mod menu {
423
423
commands
424
424
. spawn_bundle ( NodeBundle {
425
425
style : Style {
426
- margin : Rect :: all ( Val :: Auto ) ,
426
+ margin : UiRect :: all ( Val :: Auto ) ,
427
427
flex_direction : FlexDirection :: ColumnReverse ,
428
428
align_items : AlignItems :: Center ,
429
429
..default ( )
@@ -436,7 +436,7 @@ mod menu {
436
436
// Display the game name
437
437
parent. spawn_bundle ( TextBundle {
438
438
style : Style {
439
- margin : Rect :: all ( Val :: Px ( 50.0 ) ) ,
439
+ margin : UiRect :: all ( Val :: Px ( 50.0 ) ) ,
440
440
..default ( )
441
441
} ,
442
442
text : Text :: with_section (
@@ -526,7 +526,7 @@ mod menu {
526
526
fn settings_menu_setup ( mut commands : Commands , asset_server : Res < AssetServer > ) {
527
527
let button_style = Style {
528
528
size : Size :: new ( Val :: Px ( 200.0 ) , Val :: Px ( 65.0 ) ) ,
529
- margin : Rect :: all ( Val :: Px ( 20.0 ) ) ,
529
+ margin : UiRect :: all ( Val :: Px ( 20.0 ) ) ,
530
530
justify_content : JustifyContent :: Center ,
531
531
align_items : AlignItems :: Center ,
532
532
..default ( )
@@ -540,7 +540,7 @@ mod menu {
540
540
commands
541
541
. spawn_bundle ( NodeBundle {
542
542
style : Style {
543
- margin : Rect :: all ( Val :: Auto ) ,
543
+ margin : UiRect :: all ( Val :: Auto ) ,
544
544
flex_direction : FlexDirection :: ColumnReverse ,
545
545
align_items : AlignItems :: Center ,
546
546
..default ( )
@@ -609,7 +609,7 @@ mod menu {
609
609
) {
610
610
let button_style = Style {
611
611
size : Size :: new ( Val :: Px ( 200.0 ) , Val :: Px ( 65.0 ) ) ,
612
- margin : Rect :: all ( Val :: Px ( 20.0 ) ) ,
612
+ margin : UiRect :: all ( Val :: Px ( 20.0 ) ) ,
613
613
justify_content : JustifyContent :: Center ,
614
614
align_items : AlignItems :: Center ,
615
615
..default ( )
@@ -623,7 +623,7 @@ mod menu {
623
623
commands
624
624
. spawn_bundle ( NodeBundle {
625
625
style : Style {
626
- margin : Rect :: all ( Val :: Auto ) ,
626
+ margin : UiRect :: all ( Val :: Auto ) ,
627
627
flex_direction : FlexDirection :: ColumnReverse ,
628
628
align_items : AlignItems :: Center ,
629
629
..default ( )
@@ -707,7 +707,7 @@ mod menu {
707
707
) {
708
708
let button_style = Style {
709
709
size : Size :: new ( Val :: Px ( 200.0 ) , Val :: Px ( 65.0 ) ) ,
710
- margin : Rect :: all ( Val :: Px ( 20.0 ) ) ,
710
+ margin : UiRect :: all ( Val :: Px ( 20.0 ) ) ,
711
711
justify_content : JustifyContent :: Center ,
712
712
align_items : AlignItems :: Center ,
713
713
..default ( )
@@ -721,7 +721,7 @@ mod menu {
721
721
commands
722
722
. spawn_bundle ( NodeBundle {
723
723
style : Style {
724
- margin : Rect :: all ( Val :: Auto ) ,
724
+ margin : UiRect :: all ( Val :: Auto ) ,
725
725
flex_direction : FlexDirection :: ColumnReverse ,
726
726
align_items : AlignItems :: Center ,
727
727
..default ( )
0 commit comments