use torin::geometry::CursorPoint;
pub use winit::event::MouseButton;
#[derive(Debug, Clone, PartialEq)]
pub struct MouseData {
pub screen_coordinates: CursorPoint,
pub element_coordinates: CursorPoint,
pub trigger_button: Option<MouseButton>,
}
impl MouseData {
pub fn new(
screen_coordinates: CursorPoint,
element_coordinates: CursorPoint,
trigger_button: Option<MouseButton>,
) -> Self {
Self {
screen_coordinates,
element_coordinates,
trigger_button,
}
}
}
impl MouseData {
pub fn get_screen_coordinates(&self) -> CursorPoint {
self.screen_coordinates
}
pub fn get_element_coordinates(&self) -> CursorPoint {
self.element_coordinates
}
pub fn get_trigger_button(&self) -> Option<MouseButton> {
self.trigger_button
}
}