need some help with mousewhere
Author |
Message |
darkdude749
|
|
|
|
|
Sponsor Sponsor
|
|
|
Nick
|
Posted: Wed Nov 07, 2007 8:52 pm Post subject: RE:need some help with mousewhere |
|
|
have an oldx and oldy varible code: | if x not = oldx or oldy not = y then
exit
else
drawfilloval (yadda yadda)
endif
oldx:=x
oldy:=y |
|
|
|
|
|
|
Zampano
|
Posted: Thu Nov 08, 2007 9:47 am Post subject: Re: need some help with mousewhere |
|
|
On a side note is there any way to waive the other results to mousewhere. Suppose I didn't want to have to use more variable than necessary, and thence didn't want anything to do with the mousewhere. What then? |
|
|
|
|
|
Clayton
|
Posted: Thu Nov 08, 2007 2:07 pm Post subject: RE:need some help with mousewhere |
|
|
What exactly are you asking? Slow down for a second and try and explain your problem so we can understand it. |
|
|
|
|
|
Zampano
|
Posted: Thu Nov 08, 2007 2:25 pm Post subject: Re: need some help with mousewhere |
|
|
Sorry.
The question I'm asking concerns the fact that mouse.where returns threee variable: x, y, and buttons. If I don't really need to know if the button clicks are entered, and just x and y, is there a way to waive that feature so that I don't need to occupy an extra integer variable with the butto clicks information? Last time I amateurishly created a new variable just so I wouldn't get the error message. |
|
|
|
|
|
Clayton
|
Posted: Thu Nov 08, 2007 2:30 pm Post subject: RE:need some help with mousewhere |
|
|
Well.... no there isn't. You're going to have to create that extra variable to hold that "useless" value. |
|
|
|
|
|
darkdude749
|
Posted: Thu Nov 08, 2007 4:07 pm Post subject: Re: need some help with mousewhere |
|
|
Thanks momop i got it working now
this is what it looks like now:
code: | View.Set ("offscreenonly")
View.Set ("nocursor")
colour (31)
colourback (255)
cls
buttonchoose ("singlebutton")
var button : int
var x : int
var y : int
var oldx : int := 0
var oldy : int := 0
loop
for z : 1 .. 1000000
mousewhere (x, y, button)
if x = oldx and y = oldy then
put "Move your mouse around the screen."
drawfilloval (x, y, z, z, 31)
View.Update
delay (10)
cls
else
exit
end if
end for
oldx := x
oldy := y
end loop
|
|
|
|
|
|
|
|
|