1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

remove seconds_from_midnight from core egui input

It is only used by demo app, and so does not belong to egui proper.
Instead it is now passed as part of a DemoEnvironment
This commit is contained in:
Emil Ernerfeldt
2020-09-23 08:57:23 +02:00
parent b84642374b
commit b77151fb64
7 changed files with 63 additions and 45 deletions

View File

@@ -96,6 +96,10 @@ impl Backend for WebBackend {
1.0 / self.frame_times.mean_time_interval().unwrap_or_default()
}
fn seconds_since_midnight(&self) -> Option<f64> {
Some(seconds_since_midnight())
}
fn new_texture_srgba_premultiplied(
&mut self,
size: (usize, usize),
@@ -128,7 +132,6 @@ impl WebInput {
screen_size: screen_size().unwrap(),
pixels_per_point: Some(pixels_per_point()),
time: now_sec(),
seconds_since_midnight: Some(seconds_since_midnight()),
events: std::mem::take(&mut self.events),
}
}