| 2 | use winit::{event::{ElementState, Modifiers}, keyboard::Key}; |
| 3 | |
| 4 | pub struct EventState { |
| 5 | pub window_size: Size, |
| 6 | |
| 7 | pub mouse_position: Option<Point>, |
| 8 | pub previous_mouse_position: Option<Point>, |
| 9 | pub mouse_down: bool, |
| 10 | pub right_mouse_down: bool, |
| 11 | pub was_mouse_down: bool, |
| 12 | pub was_right_mouse_down: bool, |
| 13 | pub scroll_delta: Vec2, |
| 14 | |
| 15 | pub modifiers: Modifiers, |
| 16 | pub key_events: Vec<KeyEvent>, |
| 17 | } |
| 18 | |
| 19 | impl EventState { |
| 20 | pub fn new() -> Self { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…