Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Mouse Hover
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
MasterCard




PostPosted: 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?
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: