GSDP:GAM100/CProcessing/CP Input GetMouseX()
From Inside
< GSDP:GAM100 | CProcessing
Revision as of 14:41, 3 July 2020 by >J.thiel (→Related)
CP_Input_GetMouseX()
Description
The system variable CP_Input_GetMouseX() 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()
{
CP_Settings_Background(CP_Color_Create(200, 200, 200, 255));
CP_Graphics_DrawLine(CP_Input_GetMouseX(), 20, CP_Input_GetMouseX(), 80);
}