make ui ignore resize to <1.0 events

Former-commit-id: d4baa8234f6c25f2c28c07c1dbf06e6c191a4127
This commit is contained in:
Imbris 2019-04-25 09:25:56 -04:00
parent 797c8f5bb7
commit caea30a34f

View File

@ -309,7 +309,7 @@ impl Ui {
} }
pub fn handle_event(&mut self, event: Event) { pub fn handle_event(&mut self, event: Event) {
match event.0 { match event.0 {
Input::Resize(w, h) => self.window_resized = Some(Vec2::new(w, h)), Input::Resize(w, h) if w > 1.0 && h > 1.0 => self.window_resized = Some(Vec2::new(w, h)),
Input::Touch(touch) => self.ui.handle_event(Input::Touch(Touch { Input::Touch(touch) => self.ui.handle_event(Input::Touch(Touch {
xy: self.scale.scale_point(touch.xy.into()).into_array(), xy: self.scale.scale_point(touch.xy.into()).into_array(),
..touch ..touch