Skip to content

Commit 5e257fb

Browse files
teh-cmcJohannesProgrammiert
authored andcommitted
add plot_secondary_clicked to plot_ui (emilk#2318)
1 parent 3e0a394 commit 5e257fb

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
@@ -1284,6 +1284,11 @@ impl PlotUi {
12841284
self.response.clicked()
12851285
}
12861286

1287+
/// Returns `true` if the plot was clicked by the secondary button.
1288+
pub fn plot_secondary_clicked(&self) -> bool {
1289+
self.response.secondary_clicked()
1290+
}
1291+
12871292
/// The pointer position in plot coordinates. Independent of whether the pointer is in the plot area.
12881293
pub fn pointer_coordinate(&self) -> Option<PlotPoint> {
12891294
// We need to subtract the drag delta to keep in sync with the frame-delayed screen transform:

0 commit comments

Comments
 (0)