Capture all mouse events and take into account mouse attributes, fixes #58

This commit is contained in:
Yohann D'ANELLO
2021-01-08 11:21:40 +01:00
parent b42f1277b1
commit 75e93611c3
7 changed files with 27 additions and 21 deletions

View File

@ -63,7 +63,7 @@ class DisplayManager:
d.pack = TexturePack.get_pack(self.game.settings.TEXTURE_PACK)
d.update(self.game)
def handle_mouse_click(self, y: int, x: int) -> None:
def handle_mouse_click(self, y: int, x: int, attr: int) -> None:
"""
Handles the mouse clicks.
"""
@ -76,7 +76,7 @@ class DisplayManager:
# of that display
display = d
if display:
display.handle_click(y - display.y, x - display.x, self.game)
display.handle_click(y - display.y, x - display.x, attr, self.game)
def refresh(self) -> List[Display]:
"""