You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
villares edited this page May 24, 2020
·
4 revisions
Nome
mousePressed()
Exemplos
// Clique na imagem para mudar// o valor do retânguloint value =0;
voiddraw() {
fill(value);
rect(25, 25, 50, 50);
}
voidmousePressed()
{
if(value ==0) {
value =255;
} else {
value =0;
}
}
Descrição
A função mousePressed() é chamada cada vez que um botão do mouse é pressionada. A variável mousButton é utilizada para se determinar qual botão está pressionado.