pg: In TextButton.blit(), padding was used as if it would be still an int.
This commit is contained in:
parent
f76da0f202
commit
2e42dd0cb4
1 changed files with 9 additions and 0 deletions
9
pg.py
9
pg.py
|
@ -216,6 +216,15 @@ class TextButton:
|
||||||
# self.delay = delay
|
# 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
|
def bt_from_ca(ca, function): # bt_from_ca = button from collide able
|
||||||
return Button(function, ca)
|
return Button(function, ca)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue