Add drag callbacks to mouse regions

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Nathan Sobo 2022-05-26 18:59:38 -06:00
parent bd62a68234
commit 50edcb06dd
2 changed files with 27 additions and 3 deletions

View file

@ -51,6 +51,7 @@ pub struct MouseRegion {
pub bounds: RectF,
pub hover: Option<Rc<dyn Fn(bool, &mut EventContext)>>,
pub click: Option<Rc<dyn Fn(Vector2F, usize, &mut EventContext)>>,
pub drag: Option<Rc<dyn Fn(Vector2F, &mut EventContext)>>,
}
#[derive(Copy, Clone, Eq, PartialEq)]