Is possible Get 2D x,y cursor position on mouse click if i click on a irr::gui::IGUIEnvironment::addImage ?
Tnx
Tony.
Get 2D x,y cursor position on mouse click
Yes. In your event receiver, get the mouse position when the mouse is pressed or released. Get the absolute rectangle that the image is using, and ask the rectangle if the mouse position is inisde the rectangle. If you need the mouse position on the coordinate system of the image, you could do a little subtraction to get that.
Since you are handling clicks on a gui element, you might want to consider making the element a button. The button generates a click message when it is clicked. Then all you'd need to do is get the mouse position from the cursor control.
Travis
Since you are handling clicks on a gui element, you might want to consider making the element a button. The button generates a click message when it is clicked. Then all you'd need to do is get the mouse position from the cursor control.
Travis