projects
/
minwii.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
init.
[minwii.git]
/
src
/
app
/
widgets
/
playingscreen.py
diff --git
a/src/app/widgets/playingscreen.py
b/src/app/widgets/playingscreen.py
index
955a3ab
..
055ed71
100755
(executable)
--- a/
src/app/widgets/playingscreen.py
+++ b/
src/app/widgets/playingscreen.py
@@
-23,9
+23,9
@@
ON_SATURATION = 1
ON_COLUMN_OVERSIZING = 1.5
ON_COLUMN_OVERSIZING = 1.5
-def
rename_method(newNam
e) :
+def
event_handler(eventTyp
e) :
def doRename(m) :
def doRename(m) :
- m.__name__ =
newNam
e
+ m.__name__ =
'eventHandler%s' % eventTyp
e
return m
return doRename
return m
return doRename
@@
-113,7
+113,7
@@
class _PlayingScreenBase(pygame.sprite.OrderedUpdates) :
handler = getattr(self, 'eventHandler%s' % event.type, lambda e:None)
handler(event)
handler = getattr(self, 'eventHandler%s' % event.type, lambda e:None)
handler(event)
- @
rename_method('eventHandler%s' %
pygame.KEYDOWN)
+ @
event_handler(
pygame.KEYDOWN)
def handleKeyDown(self, event) :
if event.key == pygame.K_q:
self._running = False
def handleKeyDown(self, event) :
if event.key == pygame.K_q:
self._running = False
@@
-121,6
+121,9
@@
class _PlayingScreenBase(pygame.sprite.OrderedUpdates) :
if uni.isdigit() and int(uni) <=8 :
self.highlightColumn(int(uni))
if uni.isdigit() and int(uni) <=8 :
self.highlightColumn(int(uni))
+
+ @event_handler(pygame.MOUSEMOTION)
+ def handleMouseMotion(self, event) :