diff --git a/src/Section.py b/src/Section.py index e7c8f3b..1a9a891 100644 --- a/src/Section.py +++ b/src/Section.py @@ -28,7 +28,7 @@ def Setup(self, x, y, w, h): def SetBackgroundColor(self, color): self.bgColor = color - def OnClicked(self, button, x, y): + def OnMouseDown(self, button, x, y): if not self.rect.collidepoint(x, y): return raise NotImplementedError('For test') @@ -98,7 +98,7 @@ def Update(self): self.canvas.topleft ) - def OnClicked(self, button, x, y): + def OnMouseDown(self, button, x, y): print(x, y) if self.canvas.collidepoint(x, y): _localX, _localY = self.LocalPosition((x, y)) diff --git a/src/Window.py b/src/Window.py index 9ff1703..cb0796b 100644 --- a/src/Window.py +++ b/src/Window.py @@ -68,7 +68,7 @@ def EventFeedback(self, event): self.mouseButtonDown[0] = 1 # ----- for test ----- - CanvasSection.OnClicked(1, self.mouseX, self.mouseY) + CanvasSection.OnMouseDown(1, self.mouseX, self.mouseY) elif event.button == 2: self.mouseButtonDown[1] = 1