Computer Science Canada Menu |
Author: | starlight [ Wed May 11, 2005 4:19 pm ] |
Post subject: | Menu |
I search over the website about the function of the mouse in turing. And i Found few which have the same problem as I do. I read over the solution but I don't really understand it. My question is How do you make a menu that allows the user to imput their selction through a bottom (mouse-clicking )? Then the new page will be outputed. The new page will also allow the user to go back to the menu using the mouse. I know it requires mouse where, and some if statement but i just can't put them together. Help is appreciated. I treid the GUI function. But it is sorta complicated so I 'll stick with the mousewhere function. Our teacher haven't teach us about the mouse function yet. But I want to surprise her. |
Author: | Cervantes [ Thu May 12, 2005 3:27 pm ] | ||
Post subject: | |||
The most basic thing you'll need to understand is how to determine if the mouse is over top of the button. We know the coordinates of the box (we must, since we are drawing the box to the screen!) and the coordinates of the mouse (via Mouse.Where). To check if the mouse is inside the box, we can do something like this:
If you don't know how to use Mouse.Where, check the help file, or check the turing tutorials section. With those two sources, it should be easy to understand. |
Author: | starlight [ Thu May 12, 2005 6:30 pm ] | ||
Post subject: | |||
Hey I think I got it. Thanks.
|