mouseReleased

v0.1.7
mouseReleased(button);Event

Called when a mouse button is released.

Arguments

buttonThe released mouse button


In the following example, the circle's size increases when the user clicks the mouse.

size = 12;

function setup()
  createWindow(400, 400);
  textAlign(CENTER);
end

function draw()
  background('purple');
  
  text('Click to grow the circle', width/2, 50);
  circle(width/2, height/2, size);
end

-- Increase circle size when mouse released
function mouseReleased()
  size = size + 3;
end

Output

See mouseReleased in mouse.h