Seems to be a popular request. The ability to click and drag the mouse over components to toggle them rather than clicking them individually. gif from lunarvoid
Best way I can think of is to do the following
On left mouse down
Set a custom hot control id unique to this feature
Have a Hashset<Object> ready and cleared
Add the clicked component to that hashset
While hot control is equal to the unique one from above
If a component icon rect contains the mouse
if the hashset already contains the component, ignore it. That means it was already toggled.
If the hashset doesn't contain the component, toggle it, then add it to the hashet
Seems to be a popular request. The ability to click and drag the mouse over components to toggle them rather than clicking them individually. gif from lunarvoid
Best way I can think of is to do the following
On left mouse down
Hashset<Object>
ready and clearedWhile hot control is equal to the unique one from above
That should work as requested and expected.