egui
egui copied to clipboard
add functions to check which button triggered a drag start & end
currently its hard to figure out which button triggered a drag start & end event:
- for
drag_started, checkingresponse.drag_started() && ui.input().pointer.button_down( ... )usually works. however this could be false positive when multiple buttons are dragging at the same time. - for
drag_released, there seems to be no way at all.
to improve this, button_pressed is added to precisely check buttons of drag starts. and make button_released independent of clicks (closes https://github.com/emilk/egui/issues/2094) to check buttons of drag releases.
some utility functions are added to Response for convenience.