From c0aafce29ac31d53e3ab53ead8b6f9afb40b8d31 Mon Sep 17 00:00:00 2001 From: EKNr1 Date: Sun, 12 Nov 2023 14:27:41 +0100 Subject: [PATCH] Fixed Crash in TextButton(): Position was checked if it is an int, but it has to be checked if it is a tuple. --- pg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pg.py b/pg.py index f6e275a..907de47 100644 --- a/pg.py +++ b/pg.py @@ -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