GLBasic forum

Main forum => Bug Reports => Topic started by: bigsofty on 2010-Jan-22

Title: SETMOUSE
Post by: bigsofty on 2010-Jan-22
SETMOUSE simply does not work for me, it seems to set a new mouse origin, not move the mouse pointer ("SETMOUSE 100,100", makes 100,100 = 0,0), never needed to use the command before. It should move the mouse pointer to a certain x,y? Not for me, simply changes the position of 0,0 (Top left) to a certain point on the screen?
Title: Re: SETMOUSE
Post by: Moru on 2010-Jan-22
Works as expected for me, this is the code I tested with:

Code (glbasic) Select
SYSTEMPOINTER FALSE
LOCAL mx, my, b1, b2

WHILE TRUE
MOUSESTATE mx, my, b1, b2 // Grab current position
SETMOUSE 100, 100 // Reset mouse to 100,100
PRINT "mx:" + mx + " my:" + my, 0, 0
PRINT "X", mx, my // Display mouse position before resetting it
SHOWSCREEN
WEND
Title: Re: SETMOUSE
Post by: bigsofty on 2010-Jan-22
Ah, thanks Moru.

It looks like the problem is when it is used in conjunction with...
Code (glbasic) Select
SYSTEMPOINTER TRUE
... it does not work.

Is this a bug or as M$ would say "a feature"?  :S
Title: Re: SETMOUSE
Post by: Moru on 2010-Jan-22
No, it doesn't work with the systempointer
Title: Re: SETMOUSE
Post by: bigsofty on 2010-Jan-22
Thanks again for the clarification Moru. Not a big problem, I can use a sprite pointer.

Maybe it should be mentioned in the help file to avoid similar confusion though?