We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
mouse zoom help (Read 281 times)
mouse zoom help
Jan 28th, 2009, 4:15pm
 
hi

ive got text to show on screen and ive chosen a really small font is there a way to ceate a zoom lens wen the mouse rolls ove the text.
Re: mouse zoom help
Reply #1 - Feb 1st, 2009, 5:51am
 
the easiest way to do this is to change the text size when your mouse is over the text

example:
when specifying the font and size:
textFont(leFont, 55);  
change the number to a variable

now you can change that variable based on if the mouse is over the area where the text is, you'll need to use:
mouseX and mouseY

also make sure to move the textFont() out side of your setup() and into draw()
Page Index Toggle Pages: 1