import pygame , sys class Crosshair(pygame.sprite.Sprite): def __init__(self,picture_path): super().__init__() self.image = pygame.image.load(picture_path) self.rect = self.image.get_rect() def update(self): self.rect.center = pygame.mouse.get_pos() # general setup pygame.init() clock = pygame.time.Clock() # game surface screen_width = 1920 screen_height = 1080 screen = pygame.display.set_mode((screen_width,screen_height)) background = pygame.image.load("1330482.png") pygame.mouse.set_visible(False) # crosshair crosshair = Crosshair("crosshair.png") crosshair_group = pygame.sprite.Group() crosshair_group.add(Crosshair) while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() pygame.display.flip() screen.blit(background,(0,0)) crosshair_group.draw(screen) crosshair_group.update() clock.tick(60)