@@ -3,22 +3,20 @@ use bevy_inspector_egui::WorldInspectorPlugin;
33use bevy_tweening:: { lens:: * , * } ;
44use std:: time:: Duration ;
55
6- fn main ( ) -> Result < ( ) , Box < dyn std :: error :: Error > > {
6+ fn main ( ) {
77 App :: default ( )
88 . insert_resource ( WindowDescriptor {
99 title : "Menu" . to_string ( ) ,
1010 width : 800. ,
1111 height : 400. ,
1212 present_mode : bevy:: window:: PresentMode :: Fifo , // vsync
13- ..Default :: default ( )
13+ ..default ( )
1414 } )
1515 . add_plugins ( DefaultPlugins )
1616 . add_plugin ( TweeningPlugin )
1717 . add_plugin ( WorldInspectorPlugin :: new ( ) )
1818 . add_startup_system ( setup)
1919 . run ( ) ;
20-
21- Ok ( ( ) )
2220}
2321
2422fn setup ( mut commands : Commands , asset_server : Res < AssetServer > ) {
@@ -38,10 +36,10 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
3836 align_items : AlignItems :: Center ,
3937 align_self : AlignSelf :: Center ,
4038 justify_content : JustifyContent :: Center ,
41- ..Default :: default ( )
39+ ..default ( )
4240 } ,
4341 color : UiColor ( Color :: NONE ) ,
44- ..Default :: default ( )
42+ ..default ( )
4543 } )
4644 . insert ( Name :: new ( "menu" ) )
4745 . id ( ) ;
@@ -73,11 +71,11 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
7371 align_items : AlignItems :: Center ,
7472 align_self : AlignSelf :: Center ,
7573 justify_content : JustifyContent :: Center ,
76- ..Default :: default ( )
74+ ..default ( )
7775 } ,
7876 color : UiColor ( Color :: rgb_u8 ( 162 , 226 , 95 ) ) ,
7977 transform : Transform :: from_scale ( Vec3 :: splat ( 0.01 ) ) ,
80- ..Default :: default ( )
78+ ..default ( )
8179 } )
8280 . insert ( Name :: new ( format ! ( "button:{}" , text) ) )
8381 . insert ( Parent ( container) )
@@ -96,7 +94,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
9694 horizontal : HorizontalAlign :: Center ,
9795 } ,
9896 ) ,
99- ..Default :: default ( )
97+ ..default ( )
10098 } ) ;
10199 } ) ;
102100 }
0 commit comments