1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 14:20:04 -04:00

Add triple-click support (#1512)

This commit is contained in:
trevyn
2022-04-19 16:14:55 +03:00
committed by GitHub
parent 4231a5303b
commit 2932c36238
7 changed files with 136 additions and 4 deletions

View File

@@ -332,7 +332,7 @@ impl super::View for InputTest {
});
let response = ui.add(
egui::Button::new("Click, double-click or drag me with any mouse button")
egui::Button::new("Click, double-click, triple-click or drag me with any mouse button")
.sense(egui::Sense::click_and_drag()),
);
@@ -348,6 +348,9 @@ impl super::View for InputTest {
if response.double_clicked_by(button) {
new_info += &format!("Double-clicked by {:?} button\n", button);
}
if response.triple_clicked_by(button) {
new_info += &format!("Triple-clicked by {:?} button\n", button);
}
if response.dragged_by(button) {
new_info += &format!(
"Dragged by {:?} button, delta: {:?}\n",