summaryrefslogtreecommitdiff
path: root/interface/chaserview.py
diff options
context:
space:
mode:
Diffstat (limited to 'interface/chaserview.py')
-rwxr-xr-xinterface/chaserview.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/interface/chaserview.py b/interface/chaserview.py
index 7a6a8db..2c94240 100755
--- a/interface/chaserview.py
+++ b/interface/chaserview.py
@@ -4,7 +4,7 @@ import curses
import math
import threading
-from blc2.constants import INFTY, MANUAL
+from blc2.constants import INFTY, MANUAL, JOIN, CHASERSTEP
CURSES_LOCK = threading.RLock()
@@ -80,7 +80,7 @@ class ChaserView:
c = self._chaser
w = self._width - 2
- self.win.addstr(1, 1, self.fit(("%d: "% c.id) + c.name, w, True), curses.A_REVERSE if self._highlight else 0)
+ self.win.addstr(1, 1, self.fit(("%d: "% c.id) + c.name + " (%s)" % ("Join" if c.type == JOIN else c.advance_mode), w, True), curses.A_REVERSE if self._highlight else 0)
maxsteps = self._height - 4
if maxsteps < len(c.steps):
@@ -97,19 +97,22 @@ class ChaserView:
last = len(c.steps)
steps = c.steps[first:last]
for n, s in enumerate(steps, 1):
- if s.index == self._selected:
+ if first+n-1 == self._selected:
attrs = curses.A_REVERSE
else:
attrs = 0
- if s.function is not None:
+ if s.type == CHASERSTEP and s.function is not None:
ft = s.function.type[0].upper()
fid = str(s.function.id)
+ elif s.type != CHASERSTEP:
+ ft = s.type[0].upper()
+ fid = str(s.id)
else:
ft = "-"
fid = "---"
- t = "%s%3s%s|%s:%s:%s" % (ft, fid, '*' if s.duration_mode == MANUAL else ' ', format_time(s.fade_in), format_time(s.duration), format_time(s.fade_out))
- self.win.addstr(n+2, 1, self.fit((self._numformat % (s.index+1)) + ": " + s.name, w-len(t), pad=True)+t, attrs)
+ t = "%s%3s%s|%s:%s:%s" % (ft, fid, '*' if (s.type == CHASERSTEP and s.duration_mode == MANUAL) else ' ', format_time(s.fade_in), format_time(s.duration), format_time(s.fade_out))
+ self.win.addstr(n+2, 1, self.fit((self._numformat % (first+n)) + ": " + s.name, w-len(t), pad=True)+t, attrs)
if first > 0:
self.win.addch(3, self._width//2, '⯅')