def loopFrames(d_lights, images): lights = yield d_lights width, height = yield lights.d_size() while True: for image in images: yield lights.d_acquire() f = pygame.image.load(image) yield lights.d_display(f) yield d_wait(3) lights.release()
def displayFortune(d_lights): lights = yield d_lights width, height = yield lights.d_size() e = Effects(width,height) ttt = TextRenderer() background = (0,0,0) while True: fortune = clean_for_display(get_output("fortune")) text_bitmap = ttt.render_text_bitmap(fortune) yield lights.d_acquire() for f in e.marquee(text_bitmap, direction="left",begin="right",end="left"): lights.d_display(f) yield d_wait(0) lights.release()