diff options
Diffstat (limited to 'display/dpy_pygame.py')
-rw-r--r-- | display/dpy_pygame.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/display/dpy_pygame.py b/display/dpy_pygame.py index acfd200..30d7359 100644 --- a/display/dpy_pygame.py +++ b/display/dpy_pygame.py @@ -6,7 +6,7 @@ import os import pygame from pygame.locals import * -from modes import KeyPressed, KeyReleased +from .modes import KeyPressed, KeyReleased class Display: @@ -136,7 +136,8 @@ class Display: def clear(self): self.offscreen.fill([0,0,0,]) - def fixpos(self, (x, y)): + def fixpos(self, xxx_todo_changeme): + (x, y) = xxx_todo_changeme if self.scale != 1: x = int(x / self.scale) y = int(y / self.scale) @@ -185,7 +186,8 @@ class Display: def selectlist(self): return [] - def taskbar(self, (x, y, w, h)): + def taskbar(self, xxx_todo_changeme1): + (x, y, w, h) = xxx_todo_changeme1 tbs, tbh = self.tbcache if tbh != h: tbs = pygame.Surface((32, h)).convert_alpha(self.offscreen) @@ -223,7 +225,7 @@ def events_dispatch(handlers = EVENT_HANDLERS): e = pygame.event.poll() if e.type == NOEVENT: break - elif handlers.has_key(e.type): + elif e.type in handlers: handlers[e.type](e) |