mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Fix pixel vs points bug in logical screen size of glium window
This commit is contained in:
@@ -56,8 +56,7 @@ fn main() {
|
|||||||
glutin::WindowEvent::CloseRequested => quit = true,
|
glutin::WindowEvent::CloseRequested => quit = true,
|
||||||
|
|
||||||
glutin::WindowEvent::Resized(glutin::dpi::LogicalSize { width, height }) => {
|
glutin::WindowEvent::Resized(glutin::dpi::LogicalSize { width, height }) => {
|
||||||
raw_input.screen_size =
|
raw_input.screen_size = vec2(width as f32, height as f32);
|
||||||
vec2(width as f32, height as f32) / pixels_per_point;
|
|
||||||
}
|
}
|
||||||
glutin::WindowEvent::MouseInput { state, .. } => {
|
glutin::WindowEvent::MouseInput { state, .. } => {
|
||||||
raw_input.mouse_down = state == glutin::ElementState::Pressed;
|
raw_input.mouse_down = state == glutin::ElementState::Pressed;
|
||||||
|
|||||||
Reference in New Issue
Block a user