window: no float in get_middle_of_screen

This commit is contained in:
Quaternions 2025-01-03 02:30:11 -08:00
parent 2bd6868882
commit ff011f9f0c

View File

@ -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 {