egui icon indicating copy to clipboard operation
egui copied to clipboard

add functions to check which button triggered a drag start & end

Open lictex opened this issue 3 years ago • 0 comments

currently its hard to figure out which button triggered a drag start & end event:

  • for drag_started, checking response.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.

lictex avatar Dec 26 '22 12:12 lictex