implements label cache

popup_rename implemented

button binds added.
This commit is contained in:
2023-09-02 04:23:15 +01:00
parent 7ff9c9e33b
commit 2666d8081a
3 changed files with 119 additions and 20 deletions

View File

@@ -239,8 +239,7 @@ class Builder:
outputs = list()
[step(outputs) for step in (add_strip_outputs,)]
label = self.vm.strip[i].label
return psg.Frame(label if label else f"Hardware Input {i + 1}", outputs)
return psg.Frame(self.window.cache["labels"]["strip"][f"STRIP {i}||LABEL"], outputs, key=f"STRIP {i}||LABEL")
def make_tab1_rows(self) -> psg.Frame:
layout = [[self.make_tab1_row(i)] for i in range(self.kind.phys_in)]
@@ -265,8 +264,7 @@ class Builder:
outputs = list()
[step(outputs) for step in (add_strip_outputs,)]
label = self.vm.strip[i].label
return psg.Frame(label if label else f"Virtual Input {i - self.kind.phys_out + 1}", outputs)
return psg.Frame(self.window.cache["labels"]["strip"][f"STRIP {i}||LABEL"], outputs, key=f"STRIP {i}||LABEL")
def make_tab2_rows(self) -> psg.Frame:
layout = [[self.make_tab2_row(i)] for i in range(self.kind.phys_in, self.kind.phys_in + self.kind.virt_in)]
@@ -280,11 +278,7 @@ class Builder:
buses = list()
[step(buses) for step in (add_strip_outputs,)]
label = self.vm.bus[i].label
if i < self.kind.phys_out:
return psg.Frame(label if label else f"Physical Bus {i + 1}", buses)
else:
return psg.Frame(label if label else f"Virtual Bus {i - self.kind.phys_out + 1}", buses)
return psg.Frame(self.window.cache["labels"]["bus"][f"BUS {i}||LABEL"], buses)
def make_tab3_rows(self):
layout = [[self.make_tab3_row(i)] for i in range(self.kind.num_bus)]