add simple usage example to window.py

old-commit-hash: c4592e8547
vw-mqb-aeb
George Hotz 5 years ago
parent 3314b9ee47
commit 1a5a6640d5
  1. 10
      common/window.py

@ -38,3 +38,13 @@ class Window():
if event.type == pygame.MOUSEBUTTONDOWN:
mx, my = pygame.mouse.get_pos()
return mx, my
if __name__ == "__main__":
import numpy as np
win = Window(200, 200)
img = np.zeros((200,200,3), np.uint8)
while 1:
print("draw")
img += 1
win.draw(img)

Loading…
Cancel
Save