如何删除pyglet中的标题栏,我正在

2024-06-16 11:28:57 发布

您现在位置:Python中文网/ 问答频道 /正文

这是我的密码: 我不知道如何删除pyglet中的标题栏,我正在做一个精彩的介绍。请帮帮我谢谢

ag_file = "splash.gif"

animation = pyglet.resource.animation(ag_file)
sprite = pyglet.sprite.Sprite(animation)

win = pyglet.window.Window(width=sprite.width, height=sprite.height)
win.set_location(325, 225)

@win.event
def on_draw():
    win.clear()
    sprite.draw()

def close(event):
    win.close()

pyglet.clock.schedule_once(close, 9.0)


pyglet.app.run()

Tags: event密码closedefwidthwinfilepyglet
1条回答
网友
1楼 · 发布于 2024-06-16 11:28:57

我已经弄明白了!!!这是我的密码:

ag_file = "splash.gif"

animation = pyglet.resource.animation(ag_file)
sprite = pyglet.sprite.Sprite(animation)

win = pyglet.window.Window(width=sprite.width, height=sprite.height, style = 'borderless')
win.set_location(325, 225)

@win.event
def on_draw():
    win.clear()
    sprite.draw()

def close(event):
    win.close()

pyglet.clock.schedule_once(close, 9.0)

pyglet.app.run()

相关问题 更多 >