Reputation: 11
Here's my codes: I don't know how to remove the title bar in pyglet, I'm making a splash intro. Please help me Thank you!
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()
Upvotes: 0
Views: 392
Reputation: 11
I figured it out already!!! Here's my code:
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()
Upvotes: 1