简体   繁体   English

pygame_sdl2错误:未实施

[英]pygame_sdl2 error: not implented

I'm building a android app using pygame_sdl2, pygame, and pgs4a, and when I tried to run my app on my PC (as a Python File, not an android app), I got this error: 我正在使用pygame_sdl2,pygame和pgs4a构建一个Android应用,当我尝试在PC上运行应用(作为Python文件,而不是Android应用)时,出现了以下错误:

You can find my code here . 您可以在这里找到我的代码。

Thanks for your time, OrionDark7 感谢您的宝贵时间,OrionDark7

I figured it out, as Remolten said, some parts of pygame have not been implented into pygame_sdl2. 正如Remolten所说,我知道了pygame的某些部分尚未纳入pygame_sdl2中。 But here is an alternative: 但是这里有一个替代方案:

First, don't load pygame_sdl2, just pygame, and then the surface will blit to the window. 首先,不加载pygame_sdl2,仅加载pygame,然后表面将变色至窗口。

From there, you can take a screenshot of the surface you are trying to blit, and save it as an image. 从那里,您可以截取要变灰的表面的屏幕截图,并将其另存为图像。

Re-import pygame_sdl2, and load the image instead. 重新导入pygame_sdl2,然后加载图像。

This is what I have tried and it worked, pygame_sdl2 can display images, but not some shapes. 这是我尝试过的并且有效的方法,pygame_sdl2可以显示图像,但不能显示某些形状。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM