class StringIdler(Idler):
- def __init__(self, v, text="Hello Cruel World! "):
+ def __init__(self, v, text="Hello Cruel World! ",repeat=True):
self.v = v
self.mk = MessageKeeper(v)
- self.text = self.clean_text(text)
+ self.text = self.clean_text(text) + " "
- msg = [("",False, None),(self.text, True, 0.8)]
+ msg = [("",False, None),(self.text, repeat, 0.8)]
self.mk.set_messages(msg)
def clean_text(self, text):
def next(self):
self.mk.update_display()
+ def finished(self):
+ return self.mk.done()
+
class ClockIdler(Idler):
def __init__(self, v):
self.v = v
self.scrolling_message = strings
self.update_display(True)
- def update_display(self, forced = False):
+ def update_display(self, forced = False, padding = 0):
if not forced and self.next_update != None and time() < self.next_update:
return
if len(self.scrolling_message) > 0:
if len(self.scrolling_message[0][0]) > 10:
(m, r, t) = self.scrolling_message[0]
a = []
- exp = HorizScroll(m).expand(padding = 0, wraparound = True)
+ exp = HorizScroll(m).expand(padding, wraparound = r)
if t == None:
t = 0.1
else:
global idlers, idler
idlers = [
ClockIdler(v),
- StringIdler(v),
+ StringIdler(v, text="Kill 'em all", repeat=False),
StringIdler(v, text=CREDITS),
StringIdler(v, text=str(math.pi) + " "),
StringIdler(v, text=str(math.e) + " "),
+ StringIdler(v),
GrayIdler(v),
TrainIdler(v),
GrayIdler(v,one="*",zero="-"),