consolidate all repos to one for archive
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import pygame, sys
|
||||
from pygame.locals import *
|
||||
|
||||
|
||||
pygame.init()
|
||||
|
||||
WHITE = (255, 255, 255)
|
||||
BLACK = (0, 0, 0)
|
||||
|
||||
mouse_position = (0, 0)
|
||||
|
||||
screen = pygame.display.set_mode((600, 800), 0, 32)
|
||||
screen.fill(WHITE)
|
||||
pygame.display.set_caption("ScratchBoard")
|
||||
|
||||
last_pos = None
|
||||
|
||||
while True:
|
||||
for event in pygame.event.get():
|
||||
if event.type == QUIT:
|
||||
pygame.quit()
|
||||
sys.exit()
|
||||
elif event.type == MOUSEMOTION:
|
||||
mouse_position = pygame.mouse.get_pos()
|
||||
if last_pos is not None:
|
||||
pygame.draw.line(screen, BLACK, last_pos, mouse_position, 1)
|
||||
last_pos = mouse_position
|
||||
pygame.display.update()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user