def display(self, screen,sizeConstant): rect = self.rect.copy() rect.x = int(rect.x * sizeConstant) rect.y = int(rect.y * sizeConstant) rect.width = int(rect.width * sizeConstant) rect.height = int(rect.height * sizeConstant) pygame.draw.rect(screen, self.color, rect) for Component in self.conponents: Component.display(screen, sizeConstant)
def display(self, screen): pygame.draw.rect(screen, self.color, self.rect) for Component in self.conponents: Component.display(screen)