summaryrefslogtreecommitdiff
path: root/display/dpy_pygame.py
diff options
context:
space:
mode:
authorDiego Roversi <diegor@tiscali.it>2019-09-12 21:33:58 +0200
committerDiego Roversi <diegor@tiscali.it>2019-09-12 21:33:58 +0200
commitf2779197b13fdbbd0d42e48215c51d24d86ee91b (patch)
tree968267aa9909470c27b43109029e87d1f126b4e7 /display/dpy_pygame.py
parentbc2155a93cd15c975881d7ca8f57f0f4b5c4aa27 (diff)
2to3 of display module
Diffstat (limited to 'display/dpy_pygame.py')
-rw-r--r--display/dpy_pygame.py10
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)