mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 23:13:13 -04:00
Added plot_ui::plot_clicked() (#1372)
This commit is contained in:
@@ -767,6 +767,11 @@ impl PlotUi {
|
||||
self.response.hovered()
|
||||
}
|
||||
|
||||
/// Returns `true` if the plot was clicked by the primary button.
|
||||
pub fn plot_clicked(&self) -> bool {
|
||||
self.response.clicked()
|
||||
}
|
||||
|
||||
/// The pointer position in plot coordinates. Independent of whether the pointer is in the plot area.
|
||||
pub fn pointer_coordinate(&self) -> Option<Value> {
|
||||
// We need to subtract the drag delta to keep in sync with the frame-delayed screen transform:
|
||||
|
||||
Reference in New Issue
Block a user