Hacker News new | ask | show | jobs
by boterock 1957 days ago
I was doing something like that with Godot [1], the approach I took was setting some global "dragged_item" when the drag started, and then each drop target would check if the dragged_item was compatible and if the mouse was within its bounds. This way each drop target would do the check instead of some drag manager having to check whatever was under the cursor.

[1] https://github.com/0xafbf/aether/tree/master/addons/godot_im...