GSDP:GAM100/CProcessing/CP Input GetMouseWorldY()

From Inside
Jump to: navigation, search

CP_Input_GetMouseWorldY()

Description

The function CP_Input_GetMouseWorldY() always returns the current vertical coordinate of the mouse in world space. This means that the mouse position will be translated by any transformation functions called (CP_Settings_Translate() , CP_Settings_Scale() , CP_Settings_ScaleX() , CP_Settings_ScaleY() , CP_Settings_Rotate()). 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_Settings_Translate(CP_Input_GetMouseX(), CP_Input_GetMouseY());
  CP_Graphics_DrawLine(0, 0, CP_Input_GetMouseWorldX(), CP_Input_GetMouseWorldY());
}

See Also

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>