
-----------------------------------
avsrule192002
Sat Jan 22, 2005 2:08 pm

mouse clicking
-----------------------------------
Do you know the code for clicking my mouse on a START button on the output screen?

-----------------------------------
Cervantes
Sat Jan 22, 2005 2:48 pm


-----------------------------------
Check out Mouse.Where.  Search the tutorials section for it, for use the Turing Help File.  
Use that, in combination with if statements, to check if you've clicked on a button.
Or, you could use Turing's built-in GUI, which sucks.  The choice is yours.
-Cervantes

-----------------------------------
MihaiG
Sat Jan 22, 2005 3:18 pm


-----------------------------------
try this  


setscreen ("graphics:max;max")
View.Set ("offscreenonly")
Mouse.ButtonChoose ("multibutton")

var x,y,b : int % x is mouses x position y is mouses y position and b is the button
loop
cls
mousewhere (x,y,b)
put "mouse position is (",x," , ",y,")"
put "The button pressed is ",b,""
View.Update

end loop

that should give you an idea of how the mouse works have fun :-)

-----------------------------------
basketball4ever
Sat Jan 22, 2005 3:22 pm


-----------------------------------
var x, y, button : int
loop
    drawfillbox (100, 100, 200, 200, 7)
    mousewhere (x, y, button)
    if button = 1 then
        if (x >= 100 and x = 100 and y =100 and x=300 and y=0 and rangex =100 and rangey 