diff --git a/examples/games/stepping.rs b/examples/games/stepping.rs index 142f44343e..653b7a12ff 100644 --- a/examples/games/stepping.rs +++ b/examples/games/stepping.rs @@ -161,25 +161,20 @@ fn build_ui( stepping.always_run_node(label, node); } - commands - .spawn(( - Text::default(), - SteppingUi, - Node { - position_type: PositionType::Absolute, - top: state.ui_top, - left: state.ui_left, - padding: UiRect::all(Val::Px(10.0)), - ..default() - }, - BackgroundColor(Color::srgba(1.0, 1.0, 1.0, 0.33)), - Visibility::Hidden, - )) - .with_children(|p| { - for span in text_spans { - p.spawn(span); - } - }); + commands.spawn(( + Text::default(), + SteppingUi, + Node { + position_type: PositionType::Absolute, + top: state.ui_top, + left: state.ui_left, + padding: UiRect::all(Val::Px(10.0)), + ..default() + }, + BackgroundColor(Color::srgba(1.0, 1.0, 1.0, 0.33)), + Visibility::Hidden, + Children::spawn(text_spans), + )); } fn build_stepping_hint(mut commands: Commands) {