Added initial touch events to support iOS
This commit is contained in:
parent
9da6ce474c
commit
e19a07d400
13 changed files with 165 additions and 47 deletions
39
native/src/input/touch.rs
Normal file
39
native/src/input/touch.rs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
//! Build touch events.
|
||||
/// The touch of a mobile device.
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum Touch {
|
||||
/// The touch cursor was started
|
||||
Started {
|
||||
/// The X coordinate of the touch position
|
||||
x: f32,
|
||||
|
||||
/// The Y coordinate of the touch position
|
||||
y: f32,
|
||||
},
|
||||
/// The touch cursor was ended
|
||||
Ended {
|
||||
/// The X coordinate of the touch position
|
||||
x: f32,
|
||||
|
||||
/// The Y coordinate of the touch position
|
||||
y: f32,
|
||||
},
|
||||
|
||||
/// The touch was moved.
|
||||
Moved {
|
||||
/// The X coordinate of the touch position
|
||||
x: f32,
|
||||
|
||||
/// The Y coordinate of the touch position
|
||||
y: f32,
|
||||
},
|
||||
|
||||
/// Some canceled button.
|
||||
Cancelled {
|
||||
/// The X coordinate of the touch position
|
||||
x: f32,
|
||||
|
||||
/// The Y coordinate of the touch position
|
||||
y: f32,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue