# GUI that shows a slider for sound volume control and a button for testing volume.
gui = Tk()
gui.geometry("250x100")
- gui.title("LoL Announcer")
+ gui.title("Peks Announcer")
gui.protocol("WM_DELETE_WINDOW", close_script)
+ gui.wm_iconbitmap("appicon.ico")
volume_slider = Scale(gui, from_=0, to=100, orient=HORIZONTAL, command=update_volume)
- volume_slider.set(100)
- volume_slider.pack()
+ volume_slider.set(50)
+ volume_slider.grid(row=0, column=0)
mute_button = Button(gui, text='Mute', command=mute)
- mute_button.pack()
- Button(gui, text='Test volume', command=play_random_sound).pack()
+ mute_button.grid(row=0, column=1)
+ Button(gui, text='Test volume', command=play_random_sound).grid()
announcer_thread = threading.Thread(target=announcer_loop)
announcer_thread.start()
- mainloop()
+ mainloop()
++