added mute button
authorShane Pepperell <shane.pepperell@me.com>
Sat, 14 Jan 2023 02:03:39 +0000 (02:03 +0000)
committerShane Pepperell <shane.pepperell@me.com>
Sat, 14 Jan 2023 02:03:39 +0000 (02:03 +0000)
.vs/ProjectSettings.json [new file with mode: 0644]
.vs/VSWorkspaceState.json [new file with mode: 0644]
.vs/peks-announcer/FileContentIndex/3cf77d22-f694-49eb-a2a7-799f482221ec.vsidx [new file with mode: 0644]
.vs/peks-announcer/FileContentIndex/read.lock [new file with mode: 0644]
.vs/peks-announcer/v17/.wsuo [new file with mode: 0644]
.vs/slnx.sqlite [new file with mode: 0644]
announcer.pyw

diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json
new file mode 100644 (file)
index 0000000..f8b4888
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "CurrentProjectSetting": null
+}
\ No newline at end of file
diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json
new file mode 100644 (file)
index 0000000..1c55cbb
--- /dev/null
@@ -0,0 +1,7 @@
+{
+  "ExpandedNodes": [
+    ""
+  ],
+  "SelectedNode": "\\C:\\Users\\shane\\Source\\Repos\\peks-announcer",
+  "PreviewInSolutionExplorer": false
+}
\ No newline at end of file
diff --git a/.vs/peks-announcer/FileContentIndex/3cf77d22-f694-49eb-a2a7-799f482221ec.vsidx b/.vs/peks-announcer/FileContentIndex/3cf77d22-f694-49eb-a2a7-799f482221ec.vsidx
new file mode 100644 (file)
index 0000000..7cf0c7a
Binary files /dev/null and b/.vs/peks-announcer/FileContentIndex/3cf77d22-f694-49eb-a2a7-799f482221ec.vsidx differ
diff --git a/.vs/peks-announcer/FileContentIndex/read.lock b/.vs/peks-announcer/FileContentIndex/read.lock
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/.vs/peks-announcer/v17/.wsuo b/.vs/peks-announcer/v17/.wsuo
new file mode 100644 (file)
index 0000000..7de2f57
Binary files /dev/null and b/.vs/peks-announcer/v17/.wsuo differ
diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite
new file mode 100644 (file)
index 0000000..32e85b8
Binary files /dev/null and b/.vs/slnx.sqlite differ
index 0c1bbc34f04614a099682f8b66373216cd3c7968..2aa000510df051e908a3f3ee7648f3c531be5103 100644 (file)
@@ -49,6 +49,10 @@ def play_event_sound(event):
 def update_volume(v):
     global volume
     volume = int(v)
+
+def mute():
+    global volume_slider
+    volume_slider.set(0)
     
 def play_random_sound():
     play_event_sound(random.choice(list(EVENT_SOUNDS.keys())))
@@ -257,6 +261,8 @@ if __name__ == '__main__':
     volume_slider.set(100)
     volume_slider.pack()
     Button(gui, text='Test volume', command=play_random_sound).pack()
+    mute_button = Button(gui, text='Mute', command=mute)
+    mute_button.pack()
     announcer_thread = threading.Thread(target=announcer_loop)
     announcer_thread.start()
     mainloop()