Store generic mouse regions on window that contain their event type id

This commit is contained in:
Nathan Sobo 2023-08-17 08:37:55 -06:00
parent 812d3f6af6
commit b95b2af3e0
8 changed files with 130 additions and 57 deletions

View file

@ -49,12 +49,7 @@ fn playground<V: 'static>(theme: &ThemeColors) -> impl Element<V> {
.h_full()
.w_half()
.fill(theme.success(0.5))
.child(
button()
.label("Hello")
.mouse_up(MouseButton::Left, |_, _, _| (println!("up!")))
.mouse_down(MouseButton::Left, |_, _, _| (println!("down!"))),
)
.child(button().label("Hello").click(|_, _, _| println!("click!")))
}
// todo!()