Fixed Crash in TextButton():

Position was checked if it is an int, but it has to be checked if it is a tuple.
This commit is contained in:
The Wobbler 2023-11-12 14:27:41 +01:00
parent 6df677bb84
commit c0aafce29a

6
pg.py
View file

@ -111,7 +111,7 @@ class TextButton:
self.padding = padding
self.callable_position = None
if position is int:
if position is tuple:
self.position = position
else:
@ -168,10 +168,10 @@ class TextButton:
if not new_callable_pos is None:
new_pos = new_callable_pos(self.size)
elif new_pos is int:
elif new_pos is tuple:
new_callable_pos = None
elif new_pos is Callable:
else:
new_pos = new_pos(self.size)
new_callable_pos = new_pos