Text opacity with mouse moved
in
Programming Questions
•
1 years ago
Sorry but i'm kind of new to processing and i've never really worked with text before. I was wondering if anyone could help me figure out how to get the transparent words on my sketch to become more solid in colour as the mouse is moved over them individually.
This may not help but i have the code.
PImage img0;
PImage img1;
PImage img2;
PFont font1;
PFont font2;
void setup()
{
size(504, 378);
smooth();
img0 = loadImage("Journeybackyard040.JPG");
img1 = loadImage("Journeybackyard039.JPG");
img2 = loadImage("Journeybackyard041.jpg");
font1= loadFont ("OratorStd-60.vlw");
font2= loadFont ("OratorStd-200.vlw");
}
void draw()
{
background(255);
tint(255,200);
image (img0,0,0);
tint(255, 150);
image (img1,0,0);
tint(255,50);
image (img2,0,0);
textFont(font1,40);
textAlign (LEFT);
fill(255,40);
text("0573",50,300);
text("0574",400,60);
text("0575",100,100);
text("0576",0,0);
text("0577",0,0);
textFont(font2,150);
text("0574",200,60);
text("0579",50,300);
text("0579",300,400);
textFont(font2,110);
text("0579",0,80);
textFont(font2,200);
text("0579",-10,450);
textFont(font2,90);
text("0572",200,180);
}
there isn't anything in here about the changing opacity but can anyone show/teach me how i program the void mousemoved for this?
This may not help but i have the code.
PImage img0;
PImage img1;
PImage img2;
PFont font1;
PFont font2;
void setup()
{
size(504, 378);
smooth();
img0 = loadImage("Journeybackyard040.JPG");
img1 = loadImage("Journeybackyard039.JPG");
img2 = loadImage("Journeybackyard041.jpg");
font1= loadFont ("OratorStd-60.vlw");
font2= loadFont ("OratorStd-200.vlw");
}
void draw()
{
background(255);
tint(255,200);
image (img0,0,0);
tint(255, 150);
image (img1,0,0);
tint(255,50);
image (img2,0,0);
textFont(font1,40);
textAlign (LEFT);
fill(255,40);
text("0573",50,300);
text("0574",400,60);
text("0575",100,100);
text("0576",0,0);
text("0577",0,0);
textFont(font2,150);
text("0574",200,60);
text("0579",50,300);
text("0579",300,400);
textFont(font2,110);
text("0579",0,80);
textFont(font2,200);
text("0579",-10,450);
textFont(font2,90);
text("0572",200,180);
}
there isn't anything in here about the changing opacity but can anyone show/teach me how i program the void mousemoved for this?
1