window: no float in get_middle_of_screen
This commit is contained in:
parent
2bd6868882
commit
ff011f9f0c
@ -20,8 +20,8 @@ struct WindowContext<'a>{
|
||||
}
|
||||
|
||||
impl WindowContext<'_>{
|
||||
fn get_middle_of_screen(&self)->winit::dpi::PhysicalPosition<f32>{
|
||||
winit::dpi::PhysicalPosition::new(self.screen_size.x as f32/2.0,self.screen_size.y as f32/2.0)
|
||||
fn get_middle_of_screen(&self)->winit::dpi::PhysicalPosition<u32>{
|
||||
winit::dpi::PhysicalPosition::new(self.screen_size.x/2,self.screen_size.y/2)
|
||||
}
|
||||
fn window_event(&mut self,time:integer::Time,event: winit::event::WindowEvent) {
|
||||
match event {
|
||||
|
Loading…
Reference in New Issue
Block a user