fn cam_events_from_mouse(
        mouse_button: &Input<MouseButton>,
        mut mouse_move: EventReader<'_, '_, MouseMotion>,
        width: f32,
        height: f32,
        real_scale: f32,
        cam_inputs: &mut EventWriter<'_, '_, Self>,
    ) {
        if mouse_button.pressed(MouseButton::Right) {
            for MouseMotion { mut delta } in mouse_move.iter() {
                delta.x /= width;
                delta.y /= height;
                cam_inputs.send(Self::RotateAnchor(-100.0 * real_scale * delta))
            }
        }
    }
/// Processes camera events coming from the mouse buttons.
Processes camera events coming from the mouse buttons.
Processes camera events coming from the mouse buttons .
fn cam_events_from_mouse(
        mouse_button: &Input<MouseButton>,
        mut mouse_move: EventReader<'_, '_, MouseMotion>,
        width: f32,
        height: f32,
        real_scale: f32,
        cam_inputs: &mut EventWriter<'_, '_, Self>,
    ) {
        if mouse_button.pressed(MouseButton::Right) {
            for MouseMotion { mut delta } in mouse_move.iter() {
                delta.x /= width;
                delta.y /= height;
                cam_inputs.send(Self::RotateAnchor(-100.0 * real_scale * delta))
            }
        }
    }
fn cam_events_from_mouse ( mouse_button : & Input < MouseButton > , mut mouse_move : EventReader < ' _ , ' _ , MouseMotion > , width : f32 , height : f32 , real_scale : f32 , cam_inputs : & mut EventWriter < ' _ , ' _ , Self > , ) { if mouse_button . pressed ( MouseButton :: Right ) { for MouseMotion { mut delta } in mouse_move . iter ( ) { delta . x /= width ; delta . y /= height ; cam_inputs . send ( Self :: RotateAnchor ( - 100.0 * real_scale * delta ) ) } } }
Processes camera events coming from the mouse buttons.
Processes camera events coming from the mouse buttons .
mouse_button
&Input<MouseButton>
mouse_move
EventReader<'_, '_, MouseMotion>
width
f32
height
f32
real_scale
f32
cam_inputs
&mut EventWriter<'_, '_, Self>
mouse_button
&Input<MouseButton>
mouse_move
EventReader<'_, '_, MouseMotion>
width
f32
height
f32
real_scale
f32
cam_inputs
&mut EventWriter<'_, '_, Self>