only register patch events if not kind basic

add basic build script
This commit is contained in:
onyx-and-iris 2023-08-23 02:31:15 +01:00
parent d9997e1091
commit 752f93a64c
3 changed files with 32 additions and 23 deletions

3
build.ps1 Normal file
View File

@ -0,0 +1,3 @@
@("basic", "banana", "potato") | ForEach-Object {
pdm run pyinstaller "${_}.spec" --noconfirm
}

View File

@ -16,12 +16,16 @@ class Builder:
self.kind = self.vm.kind
def run(self) -> list:
row0 = self.make_row0()
row1 = self.make_row1()
row2 = self.make_row2()
return [[row0], [row1], [row2]]
layout = []
if self.kind.name == "basic":
steps = (self.make_row0,)
else:
steps = (self.make_row0, self.make_row1, self.make_row2)
for step in steps:
layout.append([step()])
return layout
def make_row0(self):
def make_row0(self) -> psg.Frame:
def add_physical_device_opts(layout):
devices = get_input_device_list(self.vm)
devices.append("Deselect Device")
@ -44,7 +48,7 @@ class Builder:
[step(hardware_out) for step in (add_physical_device_opts,)]
return psg.Frame("Hardware Out", hardware_out)
def make_row1(self):
def make_row1(self) -> psg.Frame:
def add_asio_checkboxes(layout, i):
nums = list(range(99))
layout.append(
@ -79,7 +83,7 @@ class Builder:
asio_checkboxes = [inner]
return psg.Frame("PATCH ASIO Inputs to Strips", asio_checkboxes)
def make_row2(self):
def make_row2(self) -> psg.Frame:
def add_insert_checkboxes(layout, i):
if i <= self.kind.phys_in:
layout.append(

View File

@ -41,9 +41,11 @@ class Window(psg.Window):
for i in range(1, self.vm.kind.phys_out + 1):
self[f"HARDWARE OUT||A{i}"].bind("<FocusIn>", "||FOCUS IN")
self[f"HARDWARE OUT||A{i}"].bind("<Return>", "||KEY RETURN")
if self.kind.name != "basic":
for i in range(1, self.kind.phys_out + 1):
self[f"ASIO CHECKBOX||IN{i} 0"].bind("<FocusIn>", "||FOCUS IN")
self[f"ASIO CHECKBOX||IN{i} 1"].bind("<FocusIn>", "||FOCUS IN")
if self.kind.name != "basic":
for i in range(1, self.kind.num_strip + 1):
if i <= self.kind.phys_in:
self[f"INSERT CHECKBOX||IN{i} 0"].bind("<FocusIn>", "||FOCUS IN")