From b3949e25f2148360e8070e9148ea57ea9d72fbe5 Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Tue, 28 Sep 2021 10:42:20 -0400 Subject: [PATCH] Move check_interaction to Cross clas --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index ec86a30..2ef4987 100644 --- a/main.py +++ b/main.py @@ -41,7 +41,7 @@ class Cross_painter(Widget): def on_touch_down(self,touch): # create new cross if touch.button=="right": - if self.check_add((touch.x,touch.y)): + if self.check_add(Point(touch.x,touch.y)): new=Cross(touch.x,touch.y) with self.canvas: new.draw() @@ -91,7 +91,7 @@ class Cross_painter(Widget): # check that a cross can be added at position def check_add(self,pos): for cross in self.crosses: - if self.check_interaction(pos,cross)==False: + if cross.check_interaction(pos)==False: return False return True