Skip to content

Commit dfc1f2c

Browse files
authored
add plot_secondary_clicked to plot_ui (#2318)
1 parent eca5e6a commit dfc1f2c

File tree

1 file changed

+5
-0
lines changed
  • crates/egui/src/widgets/plot

1 file changed

+5
-0
lines changed

crates/egui/src/widgets/plot/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,11 @@ impl PlotUi {
10551055
self.response.clicked()
10561056
}
10571057

1058+
/// Returns `true` if the plot was clicked by the secondary button.
1059+
pub fn plot_secondary_clicked(&self) -> bool {
1060+
self.response.secondary_clicked()
1061+
}
1062+
10581063
/// The pointer position in plot coordinates. Independent of whether the pointer is in the plot area.
10591064
pub fn pointer_coordinate(&self) -> Option<PlotPoint> {
10601065
// We need to subtract the drag delta to keep in sync with the frame-delayed screen transform:

0 commit comments

Comments
 (0)