How do I check if pressed on a text?
This is how I draw the text:
# Full code on https://github.com/Zwengel/bunny-badgers
height = pygame.display.Info().current_h
font = pygame.font.Font("freesansbold.ttf", 24)
spText = "Single Player"
sp = font.render(spText, True, (0,0,0))
spRect = sp.get_rect()
spRect.centerx = screen.get_rect().centerx
spRect.centery = height/12*5
screen.blit(sp, spRect)
pygame.mouse.get_pos()
and store it to a list called mpos withmpos = pygame.mouse.get_pos()
. \$\endgroup\$