1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

Plot items now have optional id which is returned in the plot's response when hovered (#3920)

This allows users to check which item the user interacts with in the
plot.



https://github.com/emilk/egui/assets/1220815/1a174b38-8414-49be-a802-d187cd93d154

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
Andreas Reich
2024-01-30 15:55:56 +01:00
committed by GitHub
parent 945a69d2f2
commit ca513ce241
4 changed files with 180 additions and 18 deletions

View File

@@ -14,8 +14,8 @@ pub struct PlotMemory {
/// the bounds, for example by moving or zooming.
pub auto_bounds: Vec2b,
/// Which item is hovered?
pub hovered_item: Option<String>,
/// Display string of the hovered legend item if any.
pub hovered_legend_item: Option<String>,
/// Which items _not_ to show?
pub hidden_items: ahash::HashSet<String>,