+ def _initCursor(self) :
+ self.cursor = WarpingCursor()
+ #self.add(self.cursor)
+
+
+ def highlightColumn(self, index) :
+ for i, sprite in enumerate(self.sprites()) :
+ sprite.update(i==index)
+ self.draw(pygame.display.get_surface())
+
+ def run(self):
+ self._running = True
+ clock = pygame.time.Clock()
+ while self._running :
+ pygame.display.flip()
+ EventDispatcher.dispatchEvents()
+ clock.tick(50)
+
+ @event_handler(pygame.KEYDOWN)
+ def handleKeyDown(self, event) :
+ if event.key == pygame.K_q:
+ self._running = False
+ uni = event.unicode
+
+ if uni.isdigit() and int(uni) <=8 :
+ self.highlightColumn(int(uni))