From 70b62ea7a6be3b3af801f58bc94924074fd5aec2 Mon Sep 17 00:00:00 2001 From: Ben Connors Date: Sat, 26 Oct 2019 10:59:14 -0400 Subject: More interface features - Can now edit chasers a bit o Edit component steps o Change step durations --- interface/channelbank.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'interface/channelbank.py') diff --git a/interface/channelbank.py b/interface/channelbank.py index e3dec7b..2ca964e 100755 --- a/interface/channelbank.py +++ b/interface/channelbank.py @@ -172,7 +172,19 @@ class ChannelBank: def _put_title(self): self.win.border() pos = min(self._width-2-len(self._title), (3*self._width)//4 - (len(self._title) // 2)) - self.win.addstr(self._height-1, pos, self._title) + self.win.addstr(self._height-1, pos, self._title, curses.A_REVERSE if self._highlight else 0) + + @property + def highlight(self): + return self._highlight + + @highlight.setter + def highlight(self, value): + if value != self._highlight: + self._highlight = value + with CURSES_LOCK: + self._put_title() + self.win.refresh() @title.setter def title(self, v): @@ -187,6 +199,7 @@ class ChannelBank: with CURSES_LOCK: self.win = curses.newwin(height, width, y, x) self.win.keypad(True) + self._highlight = False self.scope = frozenset(scope) self._sscope = [] self._title = "Channels" -- cgit v1.2.3