📜  如何将 x 和 y 与鼠标位置分开 python 代码示例

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

代码示例1
#just follow me

#xmousepos is a variable that assigns itsalf to the position of your cursor
#the [0] means the x position of the cursor [1] means the y position
#[1] is for the 2nd value of xmousepos / the x value
#[2] is for the 1st value of ymousepos / the y value
xmousepos=pygame.mouse.get_pos()[0]
ymousepos=pygame.mouse.get_pos()[1]

#i hope this helped yoy... now get back to work