digitalmars.D.learn - DlangUI MouseEvent mouse delta
- stunaep (7/7) Apr 26 2016 I am trying to know how much the mouse moves when clicking down
- stunaep (2/6) Apr 26 2016 I'm just wondering if there is a built in solution that I missed.
- Vadim Lopatin (5/12) Apr 27 2016 There is only information about coordinates where mouse button
I am trying to know how much the mouse moves when clicking down on a certain widget, but I can't figure out how. I noticed only a mouse wheel delta property and nothing for the mouse pointer x,y deltas since the click. I am looking to do something such as if(e.lbutton().isDown() && !e.rbutton().isDown()) { pitch -= e.dy(); }
Apr 26 2016
I am currently handling it like this:current = e.pos(); xdelta = current.x - previous.x; ydelta = current.y - previous.y; previous = current;I'm just wondering if there is a built in solution that I missed.
Apr 26 2016
On Wednesday, 27 April 2016 at 00:15:46 UTC, stunaep wrote:I am currently handling it like this:There is only information about coordinates where mouse button down event occured. event.lbutton.downX, event.lbutton.downY - stores coordinates of button down event.current = e.pos(); xdelta = current.x - previous.x; ydelta = current.y - previous.y; previous = current;I'm just wondering if there is a built in solution that I missed.
Apr 27 2016