From 07ba4b2f70e62b1887c1b738c5a67524e1fd208b Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Wed, 14 Jun 2023 09:32:34 +0200 Subject: [PATCH 01/17] update all examples as I could --- crates/bevy_input/src/common_conditions.rs | 4 +- examples/2d/bloom_2d.rs | 34 +++++++-------- examples/2d/rotation.rs | 8 ++-- examples/3d/3d_gizmos.rs | 10 ++--- examples/3d/anti_aliasing.rs | 36 ++++++++-------- examples/3d/atmospheric_fog.rs | 6 +-- examples/3d/blend_modes.rs | 16 ++++---- examples/3d/bloom_3d.rs | 34 +++++++-------- examples/3d/fog.rs | 41 ++++++++++--------- examples/3d/lighting.rs | 10 ++--- examples/3d/shadow_biases.rs | 4 +- examples/3d/shadow_caster_receiver.rs | 10 ++--- examples/3d/skybox.rs | 7 ++-- examples/3d/spotlight.rs | 14 +++---- examples/3d/tonemapping.rs | 26 ++++++------ examples/animation/animated_fox.rs | 14 +++---- examples/audio/audio_control.rs | 4 +- examples/ecs/generic_system.rs | 4 +- examples/ecs/run_conditions.rs | 6 +-- examples/ecs/state.rs | 10 ++--- examples/games/alien_cake_addict.rs | 14 +++---- examples/games/breakout.rs | 6 +-- examples/input/keyboard_modifiers.rs | 8 ++-- examples/input/mouse_grab.rs | 4 +- examples/input/text_input.rs | 6 +-- examples/shader/shader_prepass.rs | 4 +- examples/stress_tests/many_foxes.rs | 22 +++++----- examples/stress_tests/many_gizmos.rs | 8 ++-- .../tools/scene_viewer/scene_viewer_plugin.rs | 18 ++++---- examples/ui/overflow_debug.rs | 19 +++------ examples/ui/ui_scaling.rs | 6 +-- examples/ui/window_fallthrough.rs | 4 +- examples/window/clear_color.rs | 4 +- examples/window/low_power.rs | 7 +--- examples/window/scale_factor_override.rs | 10 ++--- examples/window/screenshot.rs | 4 +- examples/window/window_settings.rs | 16 ++++---- 37 files changed, 225 insertions(+), 233 deletions(-) diff --git a/crates/bevy_input/src/common_conditions.rs b/crates/bevy_input/src/common_conditions.rs index 8b85b8a858f44..e7f571dc003d6 100644 --- a/crates/bevy_input/src/common_conditions.rs +++ b/crates/bevy_input/src/common_conditions.rs @@ -83,9 +83,9 @@ where /// ``` pub fn input_just_pressed(input: T) -> impl FnMut(Res>) -> bool + Clone where - T: Copy + Eq + Hash + Send + Sync + 'static, + T: Clone + Eq + Hash + Send + Sync + 'static, { - move |inputs: Res>| inputs.just_pressed(input) + move |inputs: Res>| inputs.just_pressed(input.clone()) } /// Run condition that is active if [`Input::just_released`] is true for the given input. diff --git a/examples/2d/bloom_2d.rs b/examples/2d/bloom_2d.rs index e386611ff226e..050539ee6a801 100644 --- a/examples/2d/bloom_2d.rs +++ b/examples/2d/bloom_2d.rs @@ -92,7 +92,7 @@ fn update_bloom_settings( mut camera: Query<(Entity, Option<&mut BloomSettings>), With>, mut text: Query<&mut Text>, mut commands: Commands, - keycode: Res>, + key: Res>, time: Res