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 Nov 17, 2022
1 parent eca5e6a commit dfc1f2c
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 dfc1f2c

Please sign in to comment.