51
EZGUI 5 support forum / Re: Sprite Problem
« Last post by Chris Boss on December 16, 2022, 10:00:22 pm »EZ_TestSpriteClick does not work the way you think.
The X& and Y& parameters are not return values, but are passed BYVAL telling the function where the coordinates to test are.
In the Canvas control's %EZ_Click event you have to call first:
EZ_GetCanvasXY
to get the coordinates for the last mouse click.
Then you can pass them to EZ_TestSpriteClick to see if the click occurred on a sprite.
The X& and Y& parameters are not return values, but are passed BYVAL telling the function where the coordinates to test are.
In the Canvas control's %EZ_Click event you have to call first:
EZ_GetCanvasXY
to get the coordinates for the last mouse click.
Then you can pass them to EZ_TestSpriteClick to see if the click occurred on a sprite.