This commit is contained in:
Quaternions 2023-10-02 03:03:07 -07:00
parent c47020c149
commit 79262ce3b4

View File

@ -868,16 +868,16 @@ impl framework::Example for GraphicsData {
winit::event::ElementState::Released => false, winit::event::ElementState::Released => false,
}; };
if let Some(input_instruction)=match keycode { if let Some(input_instruction)=match keycode {
17 => Some(InputInstruction::MoveForward(s)),//W 17=>Some(InputInstruction::MoveForward(s)),//W
30 => Some(InputInstruction::MoveLeft(s)),//A 30=>Some(InputInstruction::MoveLeft(s)),//A
31 => Some(InputInstruction::MoveBack(s)),//S 31=>Some(InputInstruction::MoveBack(s)),//S
32 => Some(InputInstruction::MoveRight(s)),//D 32=>Some(InputInstruction::MoveRight(s)),//D
18 => Some(InputInstruction::MoveUp(s)),//E 18=>Some(InputInstruction::MoveUp(s)),//E
16 => Some(InputInstruction::MoveDown(s)),//Q 16=>Some(InputInstruction::MoveDown(s)),//Q
57 => Some(InputInstruction::Jump(s)),//Space 57=>Some(InputInstruction::Jump(s)),//Space
44 => Some(InputInstruction::Zoom(s)),//Z 44=>Some(InputInstruction::Zoom(s)),//Z
19 => if s{Some(InputInstruction::Reset)}else{None},//R 19=>if s{Some(InputInstruction::Reset)}else{None},//R
1 => { 01=>{//Esc
if s{ if s{
self.manual_mouse_lock=false; self.manual_mouse_lock=false;
match window.set_cursor_grab(winit::window::CursorGrabMode::None){ match window.set_cursor_grab(winit::window::CursorGrabMode::None){
@ -919,8 +919,7 @@ impl framework::Example for GraphicsData {
None None
}, },
_ => {println!("scancode {}",keycode);None}, _ => {println!("scancode {}",keycode);None},
} }{
{
self.physics.run(time); self.physics.run(time);
self.physics.process_instruction(TimedInstruction{ self.physics.process_instruction(TimedInstruction{
time, time,
@ -948,7 +947,7 @@ impl framework::Example for GraphicsData {
winit::event::DeviceEvent::MouseWheel { winit::event::DeviceEvent::MouseWheel {
delta, delta,
} => { } => {
println!("mousewheel{:?}",delta); println!("mousewheel {:?}",delta);
if false{//self.physics.style.use_scroll{ if false{//self.physics.style.use_scroll{
self.physics.run(time); self.physics.run(time);
self.physics.process_instruction(TimedInstruction{ self.physics.process_instruction(TimedInstruction{