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

This commit is contained in:
The Wobbler 2023-12-09 12:49:57 +01:00
parent f76da0f202
commit 2e42dd0cb4

9
pg.py
View file

@ -216,6 +216,15 @@ class TextButton:
# self.delay = delay
def set_rot_point(img, pos):
w, h = img.get_size()
w, h = w * 2, h * 2
img2 = pygame.Surface((w, h), pygame.SRCALPHA)
img2.blit(img, (w / 2 - pos[0], h / 2 - pos[1]))
return img2, (w, h)
def bt_from_ca(ca, function): # bt_from_ca = button from collide able
return Button(function, ca)