| 1 |
|
| 2 |
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] |
| 3 |
#[allow(non_camel_case_types)] |
| 4 |
#[allow(unused)] |
| 5 |
pub enum ModelerInputEventType { |
| 6 |
|
| 7 |
Down, |
| 8 |
|
| 9 |
Move, |
| 10 |
|
| 11 |
Up, |
| 12 |
} |
| 13 |
|
| 14 |
|
| 15 |
#[derive(Clone, Debug, PartialEq)] |
| 16 |
pub struct ModelerInput { |
| 17 |
pub event_type: ModelerInputEventType, |
| 18 |
pub pos: (f64, f64), |
| 19 |
pub time: f64, |
| 20 |
pub pressure: f64, |
| 21 |
|
| 22 |
|
| 23 |
} |
| 24 |
|
| 25 |
impl Default for ModelerInput { |
| 26 |
fn default() -> Self { |
| 27 |
Self { |
| 28 |
event_type: ModelerInputEventType::Down, |
| 29 |
pos: (0.0, 0.0), |
| 30 |
time: 0.0, |
| 31 |
pressure: 1.0, |
| 32 |
} |
| 33 |
} |
| 34 |
} |