Skip to content

Instantly share code, notes, and snippets.

@CrociDB
Created June 28, 2022 20:22
Show Gist options
  • Save CrociDB/bc2e689e7ac1c8949eeb897a93f56312 to your computer and use it in GitHub Desktop.
Save CrociDB/bc2e689e7ac1c8949eeb897a93f56312 to your computer and use it in GitHub Desktop.
screen_map.py
import pygame, sys
from pygame.locals import *
pygame.init()
windowSurface = pygame.display.set_mode((0,0), pygame.FULLSCREEN)
pygame.display.set_caption("Screen Map")
windowSurface.fill((40,40,40))
loop = True
while loop:
for event in pygame.event.get():
if event.type == QUIT: loop = False
if event.type == KEYDOWN and event.key == K_ESCAPE: loop = False
if event.type == MOUSEBUTTONDOWN:
pygame.draw.circle(windowSurface, (255,255,255), event.pos, 3)
pygame.display.update()
pygame.quit()
sys.exit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment