diff --git a/hex-grid/src/main.rs b/hex-grid/src/main.rs index 2fa1683..b61e113 100644 --- a/hex-grid/src/main.rs +++ b/hex-grid/src/main.rs @@ -257,7 +257,13 @@ impl ObjectImpl for HexGridWindowPrivate { } }); } + let click_controller = gtk::GestureClick::new(); + click_controller.connect_released(|_, press, x, y| { + println!("key pressed: {} {} {}", press, x, y); + }); + self.drawing_area.add_controller(&motion_controller); + self.drawing_area.add_controller(&click_controller); } }