I need ahelp. I need to checkwhen themouse clickis done inanareaof the screen andsend the wordthat is intheareaclickto anotherarea. For exampleif youclicked on theareaof the word"o mundo"it is sent tothegrayarea.
Thisismy code:
color strokeColor = #FFE836; String[] palavras = { "a vida", "o mundo", "as coisas", "o céu", "bonito", "ruim", "menos alegre", "feliz" }; // variavel contem o conteudo;
String[] frase; // variavel que ira receber o conteudo
void setup() {
b1 = new Botoes(65, 100, #C9C7C7); b2 = new Botoes(185, 100, #C9C7C7);
size(640, 480); background(0);
// configuracao do tipo de font para texto e posicao do texto na tela PFont font; font = loadFont("Serif-48.vlw"); textFont(font); textSize(20); fill(#74FC6B); textLeading (15);
for (int i=0, x = 20, y = 20; i < 8 ; i++) { if (i < 4) { text(palavras[i], 370, x); x+=20; } if ( i > 3) { text(palavras[i], 490, y ); y+=20; } } // fim configuracao
class Botoes { int x, y; int bWidth = 95; int bHeight = 20; color clr; boolean selected = false; Botoes(int _x, int _y, color _clr) { x = _x; y = _y; clr = _clr; }
this is myfirstpost. I'm startingto useprocessigand I'min love. I'm inadifficulty.I want tochange thebackground colorwhen you move yourmouse and letthe trail of theellipseon the screen.
I canchange thebackground colorwhen you movethe mousebut can notleave the trailof theellipse,can someonehelp me?