Skip to content

Commit

Permalink
Revert "Treat Event::PointerGone as PointerEvent::Released (#4419)"
Browse files Browse the repository at this point in the history
This reverts commit 66d2b3f.
  • Loading branch information
emilk committed May 21, 2024
1 parent 8c72df9 commit 0767d91
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/egui/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1875,8 +1875,8 @@ impl Context {
drag_started: _,
dragged,
drag_stopped: _,
hovered,
contains_pointer,
hovered,
} = interact_widgets;

if true {
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/interaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ pub(crate) fn interact(
drag_started,
dragged,
drag_stopped,
hovered,
contains_pointer,
hovered,
}
}
12 changes: 6 additions & 6 deletions crates/egui_demo_lib/src/demo/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,23 +466,23 @@ fn response_summary(response: &egui::Response, show_hovers: bool) -> String {
// These are in inverse logical/chonological order, because we show them in the ui that way:

if response.triple_clicked_by(button) {
writeln!(new_info, "Triple_clicked_by{button_suffix}").ok();
writeln!(new_info, "Triple-clicked{button_suffix}").ok();
}
if response.double_clicked_by(button) {
writeln!(new_info, "Double_clicked_by{button_suffix}").ok();
writeln!(new_info, "Double-clicked{button_suffix}").ok();
}
if response.clicked_by(button) {
writeln!(new_info, "Clicked_by{button_suffix}").ok();
writeln!(new_info, "Clicked{button_suffix}").ok();
}

if response.drag_stopped_by(button) {
writeln!(new_info, "Drag_stopped_by{button_suffix}").ok();
writeln!(new_info, "Drag stopped{button_suffix}").ok();
}
if response.dragged_by(button) {
writeln!(new_info, "Dragged_by{button_suffix}").ok();
writeln!(new_info, "Dragged{button_suffix}").ok();
}
if response.drag_started_by(button) {
writeln!(new_info, "Drag_started_by{button_suffix}").ok();
writeln!(new_info, "Drag started{button_suffix}").ok();
}
}

Expand Down

0 comments on commit 0767d91

Please sign in to comment.