Computer Science Canada

Mouse Hover

Author:  MasterCard [ Sun Jun 28, 2015 10:06 am ]
Post subject:  Mouse Hover

I uploaded an image with this code:

var scissors := Pic.FileNew ("Scissors.bmp")
Pic.Draw (scissors, 150, 100, 0)

Now I want it so that when the mouse hovers this image, a rex box borders the image and in the bottom-middle of the image, the text says "Scissors"

How do i do this?

Author:  Insectoid [ Sun Jun 28, 2015 1:15 pm ]
Post subject:  RE:Mouse Hover

You need to detect if the mouse is over the image or not. You can get the mouse coordinates with the command Mouse.Where(), which you can read about in the Turing documentation. To find if the mouse is over the image or not, you need to implement collision detection. There are many, many collision detection tutorials here. You can use the search button at the top of this website, or look through the Turing Walkthrough.


: