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.
IndexProgramming Questions & HelpPrograms › Displaying Hovering Text
Page Index Toggle Pages: 1
Displaying Hovering Text (Read 256 times)
Displaying Hovering Text
Dec 13th, 2008, 4:26am
 
I'm working on a kind of map with different points in which when the user hovers over them, text appears. However, when I hover over a point, the text prints over and over again (on top of the previous text), but I only want it to display once when I'm hovering over.

my draw() function:

void draw()
{
 update(mouseX, mouseY);
 
 noStroke();
 if (btnOver) {
   fill(95);
   textover("JHE (John Hodgins Engineering)");
 } else {
   background(222);
 }
 
 stroke(255);
 fill(btnColour);
 ellipse(btnX, btnY, btnSize, btnSize);
}



and my textover function:

void textover(String s)
{
 fill(95);
 text(s, btnX+12, btnY+6);
}


Thanks for your help.
Re: Displaying Hovering Text
Reply #1 - Dec 13th, 2008, 6:04am
 
Nevermind. I got it figured out!
Page Index Toggle Pages: 1