epezent / implot

Immediate Mode Plotting
MIT License
4.5k stars 495 forks source link

Add Rapid Plot Legend Item Selection #551

Open JunkyoLee opened 6 months ago

JunkyoLee commented 6 months ago

I propose a new method for selecting items in Plot Legend, addressing the following issue:

Currently, in the legend, users can use mouse click to show or hide individual items. However, when there are many items and a user wants to view just one, they need to hide to the others, which requires numerous mouse clicks. Repeating this process can be very tiring for users.

Now, there is a quicker and simpler way for users to select just one item, and I have also added a method for them to view all items again. Additionally, I have added methods to show or hide multiple items.

[New Actions]

[Demo: Selecting a single item and deselecting all others / Selecting all items] select_the_item_and_deselect_all_others

[Demo: Selecting/Deselecting multiple items] multiple_selection