From 2e42dd0cb43532c578d2ba91905c243325ebf66d Mon Sep 17 00:00:00 2001 From: EKNr1 Date: Sat, 9 Dec 2023 12:49:57 +0100 Subject: [PATCH] pg: In TextButton.blit(), padding was used as if it would be still an int. --- pg.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pg.py b/pg.py index 98db8dd..8cad092 100644 --- a/pg.py +++ b/pg.py @@ -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)