SETMOUSE

Previous topic - Next topic

bigsofty

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?
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Moru

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

bigsofty

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
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Moru

No, it doesn't work with the systempointer

bigsofty

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?

Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)