Mercurial > pyntnclick
changeset 647:96daa4119745 pyntnclick
Forward mouse_move events to detail windows as well.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Sun, 12 Feb 2012 12:13:08 +0200 |
parents | edcca10b8a53 |
children | b2c2b6f56291 |
files | pyntnclick/gamescreen.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pyntnclick/gamescreen.py Sun Feb 12 11:45:34 2012 +0200 +++ b/pyntnclick/gamescreen.py Sun Feb 12 12:13:08 2012 +0200 @@ -106,6 +106,8 @@ handle_result(result, self) def mouse_move(self, event, widget): + if self.game.current_detail: + return self.detail.mouse_move(event, widget) self.game.highlight_override = False self.game.current_scene.mouse_move(event.pos) self.game.old_pos = event.pos @@ -181,7 +183,7 @@ super(DetailWindow, self).draw(surface) def mouse_down(self, event, widget): - self.mouse_move(event) + self.mouse_move(event, widget) if event.button != 1: # We have a right/middle click self.game.cancel_doodah(self.screen) else: @@ -189,7 +191,7 @@ self.global_to_local(event.pos)) handle_result(result, self) - def mouse_move(self, event): + def mouse_move(self, event, widget): self._mouse_move(event.pos) def _mouse_move(self, pos):