# Leo Salazar
# 6/11/2024
# text class to put text on the screen

import pygame

class Text:

    def __init__(self, x, y, text, color, size):
        self.clicks = 0
        self.color = color
        self.text = text
        self.font = pygame.font.Font(None, size)
        self.message = self.font.render(text+"0", True, color)
        self.rect = self.message.get_rect(topleft=(x,y))

    def click(self):
        self.clicks += 1

    def update(self, screen):
        self.message = self.font.render(self.text+str(self.clicks), True, self.color)
        screen.blit(self.message, self.rect)