用户:
开心e查看:0 回复:1 评论:0 创建时间:2024-08-03T10:10:58
【作品展示】

【作品介绍】
蓝屏75475775893573434759834
【作品源代码】
import pygame
import pygame.freetype
# 初始化 pygame
pygame.init()
# 设置屏幕大小(全屏)
screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
# 填充蓝色
BLUE = (0, 0, 255)
screen.fill(BLUE)
# 初始化字体模块
pygame.freetype.init()
my_font = pygame.freetype.SysFont(None, 36) # 选择合适的字体和字号
# 要显示的文本
texts = [
"*** STOP: 0x0000007B (0xF78D2524, 0xC0000034, 0x00000000, 0x00000000)",
"Inaccessible Boot Device",
"If this is the first time you've seen this Stop error screen,",
"restart your computer. If this screen appears again, follow",
"these steps:",
"Check for viruses on your computer. Remove any newly installed",
"hard drives or hard drive controllers. Check your hard drive",
"to make sure it is properly configured and terminated.",
"Run CHKDSK /F to check for hard drive corruption, and then",
"restart your computer.",
"Technical information:",
"*** STOP: 0x0000007B (0xF78D2524, 0xC0000034, 0x00000000, 0x00000000)"
]
# 计算每行文本的位置,使其垂直居中显示
line_height = my_font.get_sized_height()
y_offset = (screen.get_height() - len(texts) * line_height) // 2
# 绘制文本
for i, text in enumerate(texts):
my_font.render_to(screen, (20, y_offset + i * line_height),
text, (255, 255, 255)) # 文字颜色为白色
# 刷新屏幕显示
pygame.display.flip()
# 保持程序运行,直到用户关闭窗口
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
# 退出程序
pygame.quit()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn