1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Deprecated RawInput::screen_size and replaced with screen_rect

This commit is contained in:
Emil Ernerfeldt
2020-12-16 21:48:02 +01:00
parent 2c766aa540
commit 709e711364
7 changed files with 74 additions and 28 deletions

View File

@@ -87,8 +87,10 @@ pub fn run(title: &str, mut storage: Box<dyn egui::app::Storage>, mut app: Box<d
let mut redraw = || {
let egui_start = Instant::now();
input_state.raw.time = Some(start_time.elapsed().as_nanos() as f64 * 1e-9);
input_state.raw.screen_size =
screen_size_in_pixels(&display) / input_state.raw.pixels_per_point.unwrap();
input_state.raw.screen_rect = Some(Rect::from_min_size(
Default::default(),
screen_size_in_pixels(&display) / input_state.raw.pixels_per_point.unwrap(),
));
ctx.begin_frame(input_state.raw.take());
let mut integration_context = egui::app::IntegrationContext {