-
-
Save llimllib/54b261544a1818d54fe341aa98ee9363 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyglet | |
class AWindow(pyglet.window.Window): | |
def __init__(self): | |
super(AWindow, self).__init__(100, 100) | |
self.batch = pyglet.graphics.Batch() | |
self.circle = pyglet.shapes.Circle( | |
50, 50, 6, color=(255, 255, 255), batch=self.batch | |
) | |
pyglet.clock.schedule_interval(self.update, 1 / 60) | |
def on_key_press(self, symbol, modifiers): | |
print("key") | |
self.label.delete() | |
def update(self, dt): | |
self.clear() | |
self.batch.draw() | |
if __name__ == "__main__": | |
window = AWindow() | |
pyglet.app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment