当在pygame窗口上时,如何防止光标改变(或等效地将光标设置为操作系统默认值)?
pygame.mouse.set_system_cursor(pygame.SYSTEM_CURSOR_ARROW)
可能完全错误。
pygame.mouse.set_cursor(YOUR_CURSOR)
。 cursor_text = (
'X ',
'XX ',
'X.X ',
'X..X ',
'X...X ',
'X....X ',
'X.....X ',
'X......X ',
'X.......X ',
'X........X ',
'X.........X ',
'X..........X ',
'X......XXXXX ',
'X...X..X ',
'X..X X..X ',
'X.X X..X ',
'XX X..X ',
' X..X ',
' XX ',
' ',
' ',
' ',
' ',
' ')
cs, mask = pygame.cursors.compile(cursor_text)
cursor = ((24, 24), (0, 0), cs, mask)
pygame.mouse.set_cursor(*cursor)