
-----------------------------------
darkdude749
Wed Nov 07, 2007 8:37 pm

need some help with mousewhere
-----------------------------------
I'm making a simple program but I'm stuck on it!!! This is what i need:
  - When the mouse is not in motion i need a filled oval to start from where the mouse is and keep growing outward
  - When the mouse is in motion i want the oval to disappear and start over again from the beginning when the mouse stops moving

This is what I have so far... If someone could just tell me what i'm missing that would be great!!!

View.Set ("offscreenonly")
View.Set ("nocursor")

colourback (255)

buttonchoose ("singlebutton")

var button : int
var x : int
var y : int

loop
    for z : 1 .. maxx
        mousewhere (x, y, button)
        drawfilloval (x, y, z, z, 31)
        View.Update
        delay (20)
        cls
    end for
    cls
end loop

CODE TAGS. HOLY SHIT CODE TAGS. GREEN TEXT? NO, USE CODE TAGS.

I MEAN COME ON.

The answer is probably going to be something that's going to make me go "oh my god i'm such an idiot"  :):):)

-----------------------------------
Nick
Wed Nov 07, 2007 8:52 pm

RE:need some help with mousewhere
-----------------------------------
have an oldx and oldy varible if x not = oldx or oldy not = y then
exit
else
drawfilloval (yadda yadda)
endif
oldx:=x
oldy:=y

-----------------------------------
Zampano
Thu Nov 08, 2007 9:47 am

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
Thu Nov 08, 2007 2:07 pm

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
Thu Nov 08, 2007 2:25 pm

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
Thu Nov 08, 2007 2:30 pm

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
Thu Nov 08, 2007 4:07 pm

Re: need some help with mousewhere
-----------------------------------
Thanks momop i got it working now  :D
this is what it looks like now: 
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


