From 8b126f636b4dda538a5bce7f2a71c79e427c1f0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czeka=C5=84ski?= Date: Sat, 4 Apr 2020 21:37:42 +0200 Subject: [PATCH] Fix adding functions to invoke in UiButton --- src/ui/UiButton.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/UiButton.py b/src/ui/UiButton.py index 2eeab0d..0587557 100644 --- a/src/ui/UiButton.py +++ b/src/ui/UiButton.py @@ -24,7 +24,9 @@ class UiButton(UiElement): self.beingClicked = False self.image = self._images[0] - self.functionsToInvokeWhenClicked = functionsToInvokeWhenClicked + self.functionsToInvokeWhenClicked = [] + + self.functionsToInvokeWhenClicked.extend(functionsToInvokeWhenClicked) def eventHandler(self, event): # change selected color if rectangle clicked