Beware! mouse-down event ($201) doesn't return mouse
position in EventX() and EventY(). For this, you need
the mouse-move event ($203). Demo of this........
mywindow=CreateWindow("Mouse Test",20,20,600,400)
mycanvas=CreateCanvas(0,0,600,400,mywindow)
SetBuffer CanvasBuffer(mycanvas)
quit%=False
Repeat
Select WaitEvent()
Case $203 ;mouse move
mx=EventX()
my=EventY()
Case $201 ;mouse down
Text mx,my,"Yes"
Text EventX(),EventY(),"No"
Case $803 ;user closed the window
quit=True
End Select
FlipCanvas mycanvas
Until quit
End
position in EventX() and EventY(). For this, you need
the mouse-move event ($203). Demo of this........
mywindow=CreateWindow("Mouse Test",20,20,600,400)
mycanvas=CreateCanvas(0,0,600,400,mywindow)
SetBuffer CanvasBuffer(mycanvas)
quit%=False
Repeat
Select WaitEvent()
Case $203 ;mouse move
mx=EventX()
my=EventY()
Case $201 ;mouse down
Text mx,my,"Yes"
Text EventX(),EventY(),"No"
Case $803 ;user closed the window
quit=True
End Select
FlipCanvas mycanvas
Until quit
End