如何删除pyglet中的标题栏,我正在启动简介

问题描述 投票:0回答:1

这是我的代码:我不知道如何删除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()
python pyglet
1个回答
0
投票

我已经知道了!!!这是我的代码:

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()
© www.soinside.com 2019 - 2024. All rights reserved.