@staticmethod
def _get_theme_images(name) :
basePath = os.path.abspath(__file__).split(os.path.sep)[:-1]
- basePath.append('data')
+ basePath.extend(['data', 'cursor'])
basePath.append(name)
basePath = os.path.sep.join(basePath)
images = [f for f in os.listdir(basePath) if os.path.splitext(f)[1] == '.png']
self.blinkMode = blinkMode
self._startBlink()
- def _stopBlink(self) :
- if self.blinkMode :
- pygame.time.set_timer(TIMEOUT, 0)
-
def _startBlink(self) :
if self.blinkMode :
self._blinking = True
pygame.time.set_timer(TIMEOUT, self.duration)
self.iterator = self.iterImages()
+ def _stopBlink(self) :
+ if self.blinkMode :
+ pygame.time.set_timer(TIMEOUT, 0)
+
def iterImages(self) :
for img in cycle(self.images) :
yield img