Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
Signed-off-by: Thxios <[email protected]>
  • Loading branch information
Thxios committed Mar 6, 2020
1 parent cb8e889 commit e289560
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Section.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/Window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e289560

Please sign in to comment.