mirror of
https://github.com/onyx-and-iris/nvda-voicemeeter.git
synced 2024-11-22 10:00:46 +00:00
swap COMPOSITE for BUSMODE
This commit is contained in:
parent
417a35764b
commit
786b2658d9
@ -271,7 +271,7 @@ class Builder:
|
||||
"""tab3 row represents bus composite toggle"""
|
||||
|
||||
def add_strip_outputs(layout):
|
||||
layout.append([psg.Button(f"COMPOSITE", size=(16, 2), key=f"BUS {i}||COMPOSITE")])
|
||||
layout.append([psg.Button(f"BUSMODE", size=(16, 2), key=f"BUS {i}||MODE")])
|
||||
|
||||
buses = list()
|
||||
[step(buses) for step in (add_strip_outputs,)]
|
||||
|
@ -27,4 +27,4 @@ def _make_output_cache(vm) -> dict:
|
||||
|
||||
|
||||
def _make_bus_mode_cache(vm) -> dict:
|
||||
return {**{f"BUS {i}||COMPOSITE": vm.bus[i].mode.get() for i in range(vm.kind.num_bus)}}
|
||||
return {**{f"BUS {i}||MODE": vm.bus[i].mode.get() for i in range(vm.kind.num_bus)}}
|
||||
|
@ -37,7 +37,7 @@ class NVDAVMWindow(psg.Window):
|
||||
self[f"HARDWARE OUT||A{i + 1}"].Widget.config(**buttonmenu_opts)
|
||||
if self.kind.name != "basic":
|
||||
[self[f"PATCH COMPOSITE||PC{i + 1}"].Widget.config(**buttonmenu_opts) for i in range(self.kind.phys_out)]
|
||||
self["ASIO BUFFER"].Widget.config(**buttonmenu_opts)
|
||||
self["ASIO BUFFER"].Widget.config(**buttonmenu_opts)
|
||||
self.register_events()
|
||||
self.current_focus = None
|
||||
|
||||
@ -92,15 +92,15 @@ class NVDAVMWindow(psg.Window):
|
||||
self[f"STRIP {i}||B{j + 1}"].bind("<FocusIn>", "||FOCUS IN")
|
||||
self[f"STRIP {i}||B{j + 1}"].bind("<Return>", "||KEY ENTER")
|
||||
|
||||
# Bus Composites
|
||||
# Bus Modes
|
||||
for i in range(self.kind.num_bus):
|
||||
self[f"BUS {i}||COMPOSITE"].bind("<FocusIn>", "||FOCUS IN")
|
||||
self["ASIO BUFFER"].bind("<Return>", "||KEY ENTER")
|
||||
self[f"BUS {i}||MODE"].bind("<FocusIn>", "||FOCUS IN")
|
||||
|
||||
# ASIO Buffer
|
||||
self["ASIO BUFFER"].bind("<FocusIn>", "||FOCUS IN")
|
||||
self["ASIO BUFFER"].bind("<space>", "||KEY SPACE", propagate=False)
|
||||
self["ASIO BUFFER"].bind("<Return>", "||KEY ENTER", propagate=False)
|
||||
if self.kind.name != "basic":
|
||||
self["ASIO BUFFER"].bind("<FocusIn>", "||FOCUS IN")
|
||||
self["ASIO BUFFER"].bind("<space>", "||KEY SPACE", propagate=False)
|
||||
self["ASIO BUFFER"].bind("<Return>", "||KEY ENTER", propagate=False)
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
@ -246,8 +246,8 @@ class NVDAVMWindow(psg.Window):
|
||||
case [["STRIP", index], [output], ["KEY", "ENTER"]]:
|
||||
self.find_element_with_focus().click()
|
||||
|
||||
# Bus composite
|
||||
case [["BUS", index], ["COMPOSITE"]]:
|
||||
# Bus modes
|
||||
case [["BUS", index], ["MODE"]]:
|
||||
val = self.cache["busmode"][event]
|
||||
if val != "normal":
|
||||
self.vm.bus[int(index)].mode.normal = True
|
||||
@ -261,10 +261,10 @@ class NVDAVMWindow(psg.Window):
|
||||
self.nvda.speak,
|
||||
f"BUS {index} {label if label else ''} bus mode {self.cache['busmode'][event]}",
|
||||
)
|
||||
case [["BUS", index], ["COMPOSITE"], ["FOCUS", "IN"]]:
|
||||
case [["BUS", index], ["MODE"], ["FOCUS", "IN"]]:
|
||||
label = self.vm.bus[int(index)].label
|
||||
self.nvda.speak(
|
||||
f"BUS {index} {label if label else ''} bus mode {self.cache['busmode'][f'BUS {index}||COMPOSITE']}"
|
||||
f"BUS {index} {label if label else ''} bus mode {self.cache['busmode'][f'BUS {index}||MODE']}"
|
||||
)
|
||||
|
||||
# Unknown
|
||||
|
Loading…
Reference in New Issue
Block a user