added drive speed display for virtual slots to live screen

Sun, 28 Oct 2012 11:23:18 +0100

author
Malte Bayer <mbayer@neo-soft.org>
date
Sun, 28 Oct 2012 11:23:18 +0100
changeset 102
72f5eb420096
parent 101
92d204c738e1
child 103
52fd4283cd2c

added drive speed display for virtual slots to live screen

slotUI/SlotCli.py file | annotate | diff | comparison | revisions
--- a/slotUI/SlotCli.py	Sun Oct 28 10:53:19 2012 +0100
+++ b/slotUI/SlotCli.py	Sun Oct 28 11:23:18 2012 +0100
@@ -133,10 +133,15 @@
                 ),
                 curses.color_pair(11 + idx) )
             """
+            if idx > 3:
+                namesuffix = " (%i)" % self.slot[idx]["drive"]
+            else:
+                namesuffix = ""
+
             self.scr.addstr((3 + (self.slot[idx]["position"] * 2)), 0,
                 "%3i | %i %15s %48s" % (
                 self.slot[idx]["position"],
-                self.slot[idx]["car"] + 1, self.slot[idx]["name"],
+                self.slot[idx]["car"] + 1, (self.slot[idx]["name"] + namesuffix),
                 "",
                 ),
                 curses.color_pair(11 + idx) )

mercurial