GSDP:GAM100/CProcessing/mouseX
From Inside
< GSDP:GAM100 | CProcessing
mouseX
Description
The system variable mouseX always contains the current horizontal coordinate of the mouse. This will track the position of the mouse anywhere on the screen, even if the window is in the background.
Example
void draw()
{
background(color(200, 200, 200, 255));
line(mouseX, 20, mouseX, 80);
}