diff --git a/Cargo.toml b/Cargo.toml index d5d15b3..ef4cac3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,6 @@ repository = "https://github.com/jamescarterbell/bevy_eventwork" license = "MIT" categories = ["game-development", "network-programming"] autoexamples = false -exclude = ["assets"] resolver = "2" [badges] @@ -48,4 +47,4 @@ async-net = {version = "2.0.0", optional = true} futures-lite = "2.0.0" [dev-dependencies] -bevy = "0.12.0" +bevy = {version = "0.12.0", features = ["default_font"]} diff --git a/assets/fonts/OpenSans-Regular.ttf b/assets/fonts/OpenSans-Regular.ttf deleted file mode 100644 index 29bfd35..0000000 Binary files a/assets/fonts/OpenSans-Regular.ttf and /dev/null differ diff --git a/assets/fonts/Staatliches-Regular.ttf b/assets/fonts/Staatliches-Regular.ttf deleted file mode 100644 index 5d8ae49..0000000 Binary files a/assets/fonts/Staatliches-Regular.ttf and /dev/null differ diff --git a/examples/client.rs b/examples/client.rs index e449fe5..6bd9bcb 100644 --- a/examples/client.rs +++ b/examples/client.rs @@ -115,19 +115,18 @@ struct GlobalChatSettings { } impl FromWorld for GlobalChatSettings { - fn from_world(world: &mut World) -> Self { - let asset_server = world.get_resource::().unwrap(); + fn from_world(_world: &mut World) -> Self { GlobalChatSettings { chat_style: TextStyle { - font: asset_server.load("fonts/OpenSans-Regular.ttf"), font_size: 20., color: Color::BLACK, + ..default() }, author_style: TextStyle { - font: asset_server.load("fonts/OpenSans-Regular.ttf"), font_size: 20., color: Color::RED, + ..default() }, } } @@ -321,7 +320,6 @@ fn handle_chat_area( fn setup_ui( mut commands: Commands, - asset_server: Res, _materials: ResMut>, ) { commands.spawn(Camera2dBundle::default()); @@ -385,9 +383,9 @@ fn setup_ui( text: Text::from_section( "Send Message!", TextStyle { - font: asset_server.load("fonts/Staatliches-Regular.ttf"), - font_size: 40., + font_size: 40., color: Color::BLACK, + ..default() }, ) .with_alignment(TextAlignment::Center), @@ -412,9 +410,9 @@ fn setup_ui( text: Text::from_section( "Connect to server", TextStyle { - font: asset_server.load("fonts/Staatliches-Regular.ttf"), font_size: 40., color: Color::BLACK, + ..default() }, ) .with_alignment(TextAlignment::Center),