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

Username:   Password: 
 RegisterRegister   
 mouse-click on image
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
noobprogrammer123




PostPosted: Mon May 03, 2004 6:46 pm   Post subject: mouse-click on image

how do i get it to tell when the mouse clicks on an image
Sponsor
Sponsor
Sponsor
sponsor
Mazer




PostPosted: Mon May 03, 2004 6:49 pm   Post subject: (No subject)

Where is the image? How big is the image?

Bottom left of image will be (x, y), with a width of w and a height of h.

code:

var mx, my, btn : int

loop
    mousewhere (mx, my, btn)
    Pic.Draw (pic, x, y, 0)

    if btn = 1 and mx >= x and mx <= x + w and my >= y and my <= my + h then
    end if
end loop
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: