Working StringIdler (missing cleansing functions)
authorMark Tearle <[email protected]>
Wed, 22 Sep 2004 09:24:48 +0000 (09:24 +0000)
committerMark Tearle <[email protected]>
Wed, 22 Sep 2004 09:24:48 +0000 (09:24 +0000)
sql-edition/servers/Idler.py
sql-edition/servers/MessageKeeper.py
sql-edition/servers/VendServer.py

index babfab1..d2cbabb 100755 (executable)
@@ -189,8 +189,9 @@ class StringIdler(Idler):
                self.text = text
 
        def next(self):
-               #self.mk.update_display()
-               self.v.display(" %8.8s " % ("BOG"))
+               #self.mk.update_display(forced=True)
+               self.mk.update_display()
 
        def reset(self):
-               self.mk.set_message(self.text, True, None)
+               msg = [(self.text, True, 0.8)]
+               self.mk.set_messages(msg)
index e9dee51..c61ce35 100755 (executable)
@@ -4,6 +4,7 @@
 import sys, os, string, re, pwd, signal
 from HorizScroll import HorizScroll
 from random import random, seed
+from time import time, sleep
 
 class MessageKeeper:
        def __init__(self, vendie):
index 7c4a278..8942855 100755 (executable)
@@ -181,8 +181,10 @@ idler = None
 def setup_idlers(v):
        global idlers, idler
        idlers = [
-               TrainIdler(v),
+               StringIdler(v),
+               StringIdler(v, text=CREDITS),
                GrayIdler(v),
+               TrainIdler(v),
                GrayIdler(v,one="*",zero="-"),
                GrayIdler(v,one="/",zero="\\"),
                GrayIdler(v,one="X",zero="O"),
@@ -190,8 +192,6 @@ def setup_idlers(v):
                GrayIdler(v,one="/",zero="\\",reorder=1),
                GrayIdler(v,one="X",zero="O",reorder=1),
                ]
-               #StringIdler(v),
-               #StringIdler(v, text=CREDITS),
        idler = choose_idler()
 
 def choose_idler():

UCC git Repository :: git.ucc.asn.au