pg: In TextButton.blit(), padding was used as if it would be still an int.

This commit is contained in:
The Wobbler 2023-11-12 15:36:37 +01:00
parent e106d87d6d
commit f76da0f202

2
pg.py
View file

@ -200,7 +200,7 @@ class TextButton:
surface = self.surface surface = self.surface
pygame.draw.rect(surface, self.bg_color, self.background) pygame.draw.rect(surface, self.bg_color, self.background)
surface.blit(self.text_object, (x + self.padding, y + self.padding)) surface.blit(self.text_object, (x + self.padding[0], y + self.padding[1]))
def check(self, mouse_pos, pressed): def check(self, mouse_pos, pressed):
return self.button.check(mouse_pos, pressed) return self.button.check(mouse_pos, pressed)