Skip to content

Commit

Permalink
Set default volume
Browse files Browse the repository at this point in the history
  • Loading branch information
hraj9258 committed May 2, 2020
1 parent 1130f58 commit 2144756
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hemlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def set_vol(val):
volume = int(val) / 100
mixer.music.set_volume(volume)


playPhoto = PhotoImage(file = "play.png")
playBtn = Button(root, image = playPhoto, command = play_music)
playBtn.pack()
Expand All @@ -35,6 +36,7 @@ def set_vol(val):
stopBtn.pack()

scale = Scale(root, from_=0, to=100, orient = HORIZONTAL, command = set_vol)
scale.set(75) #set default volume
scale.pack()

root.mainloop()

0 comments on commit 2144756

Please sign in to comment.