Computer Science Canada Mouse Click Location |
| Author: | sensfan [ Mon Dec 12, 2005 11:31 am ] |
| Post subject: | Mouse Click Location |
How can you tell Turing to recognize a mouse click within a certain boundary? Like if you click within (x1,y1) and (x2,y2). it follows a certain command, as opposed to if you clicked within another space (box's around words, making a Menu)? |
|
| Author: | do_pete [ Mon Dec 12, 2005 11:37 am ] | ||
| Post subject: | |||
Try something like this:
|
|||
| Author: | sensfan [ Mon Dec 12, 2005 11:49 am ] |
| Post subject: | |
Cool, I can manipulate that to do what I need it to do. Thanks alot. |
|
| Author: | sensfan [ Mon Dec 12, 2005 11:57 am ] |
| Post subject: | |
Actually is there any possibility you could internally document that? I'm a little unfamiliar with a few commands that you used. I know what to do to use it where I need it but I'm just not sure about how it works. |
|
| Author: | codemage [ Mon Dec 12, 2005 12:11 pm ] | ||
| Post subject: | |||
Mouse.Where finds out the X, Y location of the mouse, and the status of the button. Check the how to use a mouse in your turing programs tutorial |
|||
| Author: | codemage [ Mon Dec 12, 2005 12:12 pm ] |
| Post subject: | |
Can't edit posts here - I thought that would auto-link. The tutorial is located here http://www.compsci.ca/v2/viewtopic.php?t=6 |
|
| Author: | Tony [ Mon Dec 12, 2005 12:12 pm ] |
| Post subject: | |
sensfan - do you intend on referencing the use of that code in your program? Edit: note about autolinking |
|
| Author: | sensfan [ Mon Dec 12, 2005 1:37 pm ] |
| Post subject: | |
I will if you would like me to. No problems there. |
|
| Author: | Albrecd [ Mon Dec 12, 2005 2:00 pm ] |
| Post subject: | |
Quote: I will if you would like me to.
Most people like it when you refrence the use of their code. |
|
| Author: | Tony [ Mon Dec 12, 2005 2:42 pm ] |
| Post subject: | |
You also don't get in trouble for taking other people's code. We like it very much when CompSci.ca ends up acknowledged in assignments Also people will be willing to help you out more, and comment code provided; knowing that you will actually learn from it rather than just submit as your own. |
|