pygame将光标更改为OS光标 [英] Pygame change cursor to OS cursor

查看:262
本文介绍了pygame将光标更改为OS光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有使用pygame切换到操作系统定义的游标的简单方法?例如,在加载时切换到窗口加载圆圈或苹果沙滩球,或者在悬停在可拖动对象上时切换为箭头?

Is there a simple way to use pygame to switch to an OS-defined cursor? For example, switching to the windows loading circle or apple beach-ball when loading, or changing to arrows when hovering over a draggable object?

Pygame提供了光标模块,用于加载位图来替换光标,但我想改用操作系统定义的游标.

Pygame provides the cursor module for loading a bitmap to replace the cursor, but I'd like to defer to the OS-defined cursors instead.

推荐答案

来自:链接,如果有人仍然认为它有用:您可以将 pygame.mouse.set_cursor 方法与e一起使用.G. pygame.SYSTEM_CURSOR_WAIT 作为第一个参数.

From: link, if anyone still finds it useful: you can use the pygame.mouse.set_cursor method with e. g. pygame.SYSTEM_CURSOR_WAIT as the first argument.

这篇关于pygame将光标更改为OS光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆