Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Bevy to 0.15 #46

Merged
merged 5 commits into from
Dec 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix diagnostic visibility switch
  • Loading branch information
Ray Redondo committed Dec 8, 2024
commit 3419547ce6afb7af4ddc9b0e5184b3e1cef864ae
10 changes: 9 additions & 1 deletion examples/common/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fn keyboard_input_system(
&mut Visibility,
(
With<Text>,
Or<(With<FpsText>, With<OriginText>)>,
Or<(With<FpsTextRoot>, With<OriginTextRoot>)>,
Without<Svg2d>,
Without<Svg3d>,
),
Expand Down Expand Up @@ -122,6 +122,9 @@ struct FpsMaxText;
#[derive(Component)]
struct FrameTimeText;

#[derive(Component)]
struct FpsTextRoot;

#[derive(Resource)]
struct FpsValues {
min: f64,
Expand Down Expand Up @@ -152,6 +155,7 @@ fn setup_fps_counter(mut commands: Commands, asset_server: Res<AssetServer>) {
left: Val::Px(15.0),
..default()
},
FpsTextRoot,
))
.with_children(|commands| {
commands.spawn((
Expand Down Expand Up @@ -225,6 +229,9 @@ fn fps_text_update_system(
#[derive(Component)]
struct OriginText;

#[derive(Component)]
struct OriginTextRoot;

fn setup_origin_text(mut commands: Commands, asset_server: Res<AssetServer>) {
let font_bold = asset_server.load("fonts/FiraSans-Bold.ttf");
let font_medium = asset_server.load("fonts/FiraMono-Medium.ttf");
Expand All @@ -240,6 +247,7 @@ fn setup_origin_text(mut commands: Commands, asset_server: Res<AssetServer>) {
left: Val::Px(15.0),
..default()
},
OriginTextRoot,
))
.with_children(|commands| {
commands.spawn((TextSpan::new("Origin: "), TextFont::from_font(font_bold)));
Expand Down