1
I’m creating a class called Button
, and one of the properties of this class is an image.
I wanted to know if you have a problem, if within this class I used self.imagem = pygame.image.load()
not need to pass the image as argument, since in this application I will only have a button image.
That way whenever I create a Button it will read the same image again or will know that you have loaded this image before and will simply pull it from a cache, I don’t know?
elaborate more your question, maybe putting a piece of code can help the community more and give you a more accurate answer
– Um Programador