mirror of
https://github.com/onyx-and-iris/nvda-voicemeeter.git
synced 2024-11-22 18:00:50 +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"""
|
"""tab3 row represents bus composite toggle"""
|
||||||
|
|
||||||
def add_strip_outputs(layout):
|
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()
|
buses = list()
|
||||||
[step(buses) for step in (add_strip_outputs,)]
|
[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:
|
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)
|
self[f"HARDWARE OUT||A{i + 1}"].Widget.config(**buttonmenu_opts)
|
||||||
if self.kind.name != "basic":
|
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[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.register_events()
|
||||||
self.current_focus = None
|
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("<FocusIn>", "||FOCUS IN")
|
||||||
self[f"STRIP {i}||B{j + 1}"].bind("<Return>", "||KEY ENTER")
|
self[f"STRIP {i}||B{j + 1}"].bind("<Return>", "||KEY ENTER")
|
||||||
|
|
||||||
# Bus Composites
|
# Bus Modes
|
||||||
for i in range(self.kind.num_bus):
|
for i in range(self.kind.num_bus):
|
||||||
self[f"BUS {i}||COMPOSITE"].bind("<FocusIn>", "||FOCUS IN")
|
self[f"BUS {i}||MODE"].bind("<FocusIn>", "||FOCUS IN")
|
||||||
self["ASIO BUFFER"].bind("<Return>", "||KEY ENTER")
|
|
||||||
|
|
||||||
# ASIO Buffer
|
# ASIO Buffer
|
||||||
self["ASIO BUFFER"].bind("<FocusIn>", "||FOCUS IN")
|
if self.kind.name != "basic":
|
||||||
self["ASIO BUFFER"].bind("<space>", "||KEY SPACE", propagate=False)
|
self["ASIO BUFFER"].bind("<FocusIn>", "||FOCUS IN")
|
||||||
self["ASIO BUFFER"].bind("<Return>", "||KEY ENTER", propagate=False)
|
self["ASIO BUFFER"].bind("<space>", "||KEY SPACE", propagate=False)
|
||||||
|
self["ASIO BUFFER"].bind("<Return>", "||KEY ENTER", propagate=False)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
"""
|
"""
|
||||||
@ -246,8 +246,8 @@ class NVDAVMWindow(psg.Window):
|
|||||||
case [["STRIP", index], [output], ["KEY", "ENTER"]]:
|
case [["STRIP", index], [output], ["KEY", "ENTER"]]:
|
||||||
self.find_element_with_focus().click()
|
self.find_element_with_focus().click()
|
||||||
|
|
||||||
# Bus composite
|
# Bus modes
|
||||||
case [["BUS", index], ["COMPOSITE"]]:
|
case [["BUS", index], ["MODE"]]:
|
||||||
val = self.cache["busmode"][event]
|
val = self.cache["busmode"][event]
|
||||||
if val != "normal":
|
if val != "normal":
|
||||||
self.vm.bus[int(index)].mode.normal = True
|
self.vm.bus[int(index)].mode.normal = True
|
||||||
@ -261,10 +261,10 @@ class NVDAVMWindow(psg.Window):
|
|||||||
self.nvda.speak,
|
self.nvda.speak,
|
||||||
f"BUS {index} {label if label else ''} bus mode {self.cache['busmode'][event]}",
|
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
|
label = self.vm.bus[int(index)].label
|
||||||
self.nvda.speak(
|
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
|
# Unknown
|
||||||
|
Loading…
Reference in New Issue
Block a user