Skip to content

Commit

Permalink
add plot_secondary_clicked to plot_ui (#2318)
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc authored and emilk committed Dec 2, 2022
1 parent 922448c commit 59624c6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/egui/src/widgets/plot/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,11 @@ impl PlotUi {
self.response.clicked()
}

/// Returns `true` if the plot was clicked by the secondary button.
pub fn plot_secondary_clicked(&self) -> bool {
self.response.secondary_clicked()
}

/// The pointer position in plot coordinates. Independent of whether the pointer is in the plot area.
pub fn pointer_coordinate(&self) -> Option<PlotPoint> {
// We need to subtract the drag delta to keep in sync with the frame-delayed screen transform:
Expand Down

0 comments on commit 59624c6

Please sign in to comment.