问题
Is there a way to use the mouse while,
pygame.mouse.set_visible(False)
is activated. Currently mouse only returns the bottom-right coordinate when tried to be used. Being able to get correct coordinates while mouse is hidden is required.
Could not find an answer at their documentation.
回答1:
I solved the problem by using an invisible cursor.
pygame.mouse.set_cursor((8,8),(0,0),(0,0,0,0,0,0,0,0),(0,0,0,0,0,0,0,0))
来源:https://stackoverflow.com/questions/40627934/use-pygame-mouse-while-hidden