gpt4 book ai didi

python - 向 Pygame 应用程序添加 GUI 的最佳方式是什么?

转载 作者:太空狗 更新时间:2023-10-29 17:57:37 24 4
gpt4 key购买 nike

是否有任何好的 GUI 支持 Pygame 表面作为应用程序中的小部件?

如果这不可能或不切实际,那么哪个 GUI 工具包具有最好的图形组件?我希望通过 SDL 包装器保持快速渲染。

最佳答案

不要使用 wxPython,它很难与 Pygame 一起工作,如 GUI section 中所述Pygame 维基的。

First of all, pygame relies on the SDL, which means that it can only have one window at a time. Thus, trying to implement multiple Gtk, Qt, ... application instances that use pygame, is an impossibility. The second problematic reason is that those toolkits use their own main loop, which possibly forces you to pipe their events to your pygame instance and vice versa. And to mention some other points in short: Drawing the toolkit elements on the pygame window is impossible and the SDL/pygame fullscreen mode will be problematic.

相反,选择该页面底部列出的任何库。我用 pgu我自己。

关于python - 向 Pygame 应用程序添加 GUI 的最佳方式是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2142912/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com