📜  pygame 获取鼠标位置 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:09.007000             🧑  作者: Mango

代码示例2
pygame.mouse.get_pos()
    get the mouse cursor position
    get_pos() -> (x, y)

    Returns the x and y position of the mouse cursor. 
    The position is relative to the top-left corner of the display. 
    The cursor position can be located outside of the display window,
    but is always constrained to the screen.