how to get a clickable fading text?
hello,
I really need some help. I'm just a beginner so sorry if the answer would actually be really easy..
I'm trying to get a text/headline that slowly fades out (mine is somehow fading in..) and is clickable. Meaning: if you click with a mouse button on the headline another window opens and shows some other preselectet text. I'm not even sure if that is possible. Since there will be a lot of other headlines working the same way (hopefully), the click needs to be anywhere on the headline.
- PFont f;
- float alphaValue = 0;
- void setup() {
- size(400, 100);
- f = createFont("Arial", 22, true);
- smooth();
- }
- void draw() {
- background(255);
- stroke(175);
- textFont(f);
- fill(0);
- text("more trial and error", 200, 50);
- text("trying new stuff", 30, 70);
- if (millis() > 1000) {
- fill(0, alphaValue);
- text("trial and error", 20, 20);
- if (alphaValue < 255) {
- alphaValue++;
- }
- }
- }