pyglet_demo/pyglet_demo.py

23 lines
No EOL
527 B
Python

import pyglet
import engine
import unittest
unittest.main(exit=False)
print("Hello!!!")
engine.screen.init_window()
window = engine.screen.window
label = pyglet.text.Label('Hello, world',
font_name='Times New Roman',
font_size=window.height//8,
x=window.width//2, y=window.height//2,
anchor_x='center', anchor_y='center')
@window.event
def on_draw():
engine.screen.window.clear()
label.draw()
pyglet.app.run()