Window.mousePosition

Wraps SDL_GetMouseState which gets the mouse position in the window

  1. int[2] mousePosition()
    class Window
    const @property @trusted
    int[2]
    mousePosition
    ()
  2. void mousePosition(int[2] newMousePosition)

Return Value

Type: int[2]

[x, y] of the mouse position relative to the window, otherwise [-1, -1] if mouse input is not focused to the window

Meta