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:
parent
6df677bb84
commit
c0aafce29a
1 changed files with 3 additions and 3 deletions
6
pg.py
6
pg.py
|
@ -111,7 +111,7 @@ class TextButton:
|
||||||
self.padding = padding
|
self.padding = padding
|
||||||
self.callable_position = None
|
self.callable_position = None
|
||||||
|
|
||||||
if position is int:
|
if position is tuple:
|
||||||
self.position = position
|
self.position = position
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
@ -168,10 +168,10 @@ class TextButton:
|
||||||
if not new_callable_pos is None:
|
if not new_callable_pos is None:
|
||||||
new_pos = new_callable_pos(self.size)
|
new_pos = new_callable_pos(self.size)
|
||||||
|
|
||||||
elif new_pos is int:
|
elif new_pos is tuple:
|
||||||
new_callable_pos = None
|
new_callable_pos = None
|
||||||
|
|
||||||
elif new_pos is Callable:
|
else:
|
||||||
new_pos = new_pos(self.size)
|
new_pos = new_pos(self.size)
|
||||||
new_callable_pos = new_pos
|
new_callable_pos = new_pos
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue