GSDP:GAM100/CProcessing/CP Input GetMousePreviousY()
From Inside
< GSDP:GAM100 | CProcessing
Revision as of 14:44, 3 July 2020 by >J.thiel (→Related)
CP_Input_GetMousePreviousY()
Description
The function CP_Input_GetMousePreviousY() always returns the previous vertical coordinate of the mouse. This value will be the same as CP_Input_GetMouseY() the previous frame. 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(), CP_Input_GetMouseY(), CP_Input_GetMousePreviousX(), CP_Input_GetMousePreviousY());
}