forked from StrafesNET/strafe-client
move mouse and physics types to common
This commit is contained in:
parent
eb99ea3707
commit
0985661e45
@ -5,7 +5,7 @@ pub enum Instruction{
|
||||
Create,
|
||||
Delete,
|
||||
Push{
|
||||
ins:strafesnet_common::instruction::TimedInstruction<crate::physics::PhysicsInputInstruction>,
|
||||
ins:strafesnet_common::instruction::TimedInstruction<strafesnet_common::physics::Instruction>,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ pub enum WindowInstruction{
|
||||
//holds thread handles to dispatch to
|
||||
struct WindowContext<'a>{
|
||||
manual_mouse_lock:bool,
|
||||
mouse:crate::physics::MouseState,//std::sync::Arc<std::sync::Mutex<>>
|
||||
mouse:strafesnet_common::mouse::MouseState,//std::sync::Arc<std::sync::Mutex<>>
|
||||
screen_size:glam::UVec2,
|
||||
user_settings:crate::settings::UserSettings,
|
||||
window:&'a winit::window::Window,
|
||||
@ -113,7 +113,7 @@ impl WindowContext<'_>{
|
||||
"z"=>Some(InputInstruction::Zoom(s)),
|
||||
"r"=>if s{
|
||||
//mouse needs to be reset since the position is absolute
|
||||
self.mouse=crate::physics::MouseState::default();
|
||||
self.mouse=strafesnet_common::mouse::MouseState::default();
|
||||
Some(InputInstruction::Restart)
|
||||
}else{None},
|
||||
"f"=>if s{Some(InputInstruction::PracticeFly)}else{None},
|
||||
@ -200,7 +200,7 @@ impl<'a> WindowContextSetup<'a>{
|
||||
let graphics_thread=crate::graphics_worker::new(self.graphics,setup_context.config,setup_context.surface,setup_context.device,setup_context.queue);
|
||||
WindowContext{
|
||||
manual_mouse_lock:false,
|
||||
mouse:crate::physics::MouseState::default(),
|
||||
mouse:strafesnet_common::mouse::MouseState::default(),
|
||||
//make sure to update this!!!!!
|
||||
screen_size,
|
||||
user_settings:self.user_settings,
|
||||
|
Loading…
Reference in New Issue
Block a user