Compare commits

...

3 Commits

Author SHA1 Message Date
39bd5f21ea patch bump
fixes #3
2023-09-06 19:19:54 +01:00
77dfd00541 reduces the bus mode list for basic kind 2023-09-06 19:18:31 +01:00
790ac10d4a remove EQ button and events if kind is basic 2023-09-06 19:18:14 +01:00
4 changed files with 24 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
[project] [project]
name = "nvda_voicemeeter" name = "nvda_voicemeeter"
version = "0.1.1" version = "0.1.2"
description = "A Voicemeeter app compatible with NVDA" description = "A Voicemeeter app compatible with NVDA"
authors = [ authors = [
{ name = "onyx-and-iris", email = "code@onyxandiris.online" }, { name = "onyx-and-iris", email = "code@onyxandiris.online" },

View File

@@ -325,12 +325,18 @@ class Builder:
"""tab3 row represents bus composite toggle""" """tab3 row represents bus composite toggle"""
def add_strip_outputs(layout): def add_strip_outputs(layout):
params = ["MONO", "EQ", "MUTE", "MODE"]
if self.vm.kind.name == "basic":
params.remove("EQ")
label = {"MODE": "BUSMODE"}
layout.append( layout.append(
[ [
psg.Button("Mono", size=(6, 2), key=f"BUS {i}||MONO"), psg.Button(
psg.Button("EQ", size=(6, 2), key=f"BUS {i}||EQ"), label.get(param, param.capitalize()),
psg.Button("Mute", size=(6, 2), key=f"BUS {i}||MUTE"), size=(12 if param == "MODE" else 6, 2),
psg.Button(f"BUSMODE", size=(12, 2), key=f"BUS {i}||MODE"), key=f"BUS {i}||{param}",
)
for param in params
] ]
) )

View File

@@ -94,7 +94,14 @@ def get_channel_identifier_list(vm) -> list:
return identifiers return identifiers
def get_bus_modes() -> list: def get_bus_modes(vm) -> list:
if vm.kind.name == "basic":
return [
"normal",
"amix",
"repeat",
"composite",
]
return [ return [
"normal", "normal",
"amix", "amix",

View File

@@ -185,8 +185,11 @@ class NVDAVMWindow(psg.Window):
self[f"STRIP {i}||{param}"].bind("<Return>", "||KEY ENTER") self[f"STRIP {i}||{param}"].bind("<Return>", "||KEY ENTER")
# Bus Params # Bus Params
params = ["MONO", "EQ", "MUTE", "MODE"]
if self.vm.kind.name == "basic":
params.remove("EQ")
for i in range(self.kind.num_bus): for i in range(self.kind.num_bus):
for param in ("MONO", "EQ", "MUTE", "MODE"): for param in params:
self[f"BUS {i}||{param}"].bind("<FocusIn>", "||FOCUS IN") self[f"BUS {i}||{param}"].bind("<FocusIn>", "||FOCUS IN")
self[f"BUS {i}||{param}"].bind("<Return>", "||KEY ENTER") self[f"BUS {i}||{param}"].bind("<Return>", "||KEY ENTER")
@@ -583,7 +586,7 @@ class NVDAVMWindow(psg.Window):
f"{label} bus {param} {'on' if val else 'off'}", f"{label} bus {param} {'on' if val else 'off'}",
) )
case "MODE": case "MODE":
bus_modes = get_bus_modes() bus_modes = get_bus_modes(self.vm)
next_index = bus_modes.index(val) + 1 next_index = bus_modes.index(val) + 1
if next_index == len(bus_modes): if next_index == len(bus_modes):
next_index = 0 next_index = 0