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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user