()
| 18 | |
| 19 | impl EventState { |
| 20 | pub fn new() -> Self { |
| 21 | Self { |
| 22 | window_size: Size::new(0., 0.), |
| 23 | |
| 24 | mouse_position: None, |
| 25 | previous_mouse_position: None, |
| 26 | mouse_down: false, |
| 27 | right_mouse_down: false, |
| 28 | was_mouse_down: false, |
| 29 | was_right_mouse_down: false, |
| 30 | scroll_delta: Vec2::new(0., 0.), |
| 31 | |
| 32 | modifiers: Modifiers::default(), |
| 33 | key_events: Vec::new(), |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | pub fn next_frame(&mut self) { |
| 38 | self.was_mouse_down = self.mouse_down; |
nothing calls this directly
no outgoing calls
no test coverage detected