 | blc2 - Python library and frontend for running theatrical lighting and SFX. Written for the English 2041F fall 2019 theatre production of "The Cenci".
git clone https://benconnors.ca/git-repos/blc2
|
Log | Files | Refs
commit 711805d71ee4abdac1e5c96a702647e493cc9056
parent 1884a5197fbdf98bdaebafe2b25e3a7181967e30
Author: Ben Connors <benconnors@outlook.com>
Date: Fri, 8 Nov 2019 23:17:35 -0500
Minor UX improvements
- Single-letter to advance first/second chaser
- Edit leftmost chaser by default from base mode
Diffstat:
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/interface/interface.py b/interface/interface.py
@@ -111,9 +111,14 @@ class Interface:
def handle_enter(self, fid):
with self.w_lock:
- if fid not in self.w.functions:
- return "No such function"
- f = self.w.functions[fid]
+ if fid is None:
+ if not self.chaser_views:
+ return "No chaser loaded"
+ f = self.chaser_views[0].chaser
+ else:
+ if fid not in self.w.functions:
+ return "No such function"
+ f = self.w.functions[fid]
if self.current_cv is not None:
self.current_cv.highlight = False
@@ -610,6 +615,7 @@ class Interface:
self.context_base = Input.parse_context((
("edit $num", self.handle_enter),
+ ("edit", lambda: self.handle_enter(None)),
("delete $num", self.base_delete),
("new scene $quoted_string", lambda n: self.base_new(n, Scene)),
("new chaser $quoted_string", lambda n: self.base_new(n, Chaser)),
@@ -744,6 +750,8 @@ class Interface:
("advance $letter", lambda n: self.run_jump(n, None, True)),
("advance $num", lambda n: self.run_jump(n, None, False)),
+ ("advance", lambda: self.run_jump(0, None, True)),
+ ("badvance", lambda: self.run_jump(1, None, True)),
))
self.output = output