editor.py 379 B

1234567891011121314151617
  1. import pyglet
  2. from pyglet.gl import *
  3. from pyglet.window import key
  4. class EditorWindow(pyglet.window.Window):
  5. def __init__(self):
  6. super(EditorWindow, self).__init__()
  7. self.label = pyglet.text.Label('Hi!')
  8. def on_draw(self):
  9. self.clear()
  10. self.label.draw()
  11. if __name__ == '__main__':
  12. window = EditorWindow()
  13. pyglet.app.run()