Commit cc2709e6 by BellCodeEditor

save project

parent 9209d6a9
Showing with 10 additions and 2 deletions
......@@ -13,7 +13,7 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮
last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮
basic_font=pygame.image.Font('neuropoi',14)
basic_font=pygame.font.Font('neuropol.ttf',14)
music_list = []
path = "C:\\Users\\Administrator\\Documents\\pygame_lesson6_diy1"
......@@ -66,6 +66,9 @@ while True:
click += 2
else:
click += 1
music1=pygame.mixer.music.Sound(path + "\\" + music_list[num])
music_legth=music1.get_length()
music_legth=int(music_lehght)
if x > 120 and x < 220 and y > 350 and y < 400: # 上一曲
num -= 1
......@@ -79,6 +82,9 @@ while True:
click += 2
else:
click += 1
music1=pygame.mixer.music.Sound(path + "\\" + music_list[num])
music_legth=music1.get_length()
music_legth=int(music_lehght)
if pygame.mixer.music.get_busy() == False:
num += 1
......@@ -87,7 +93,6 @@ while True:
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
music1=pygame.mixer.music.Sound(path + "\\" + music_list[num])
music_legth=music1.get_length()
music_legth=int(music_lehght)
......@@ -102,6 +107,9 @@ while True:
music_m=music_legth//60
music_s=music_legth%60
if music_m<10:
music_m="0"+str(music_m)
info2=str(music_m)+":"+str(music_m)
info2=str(music_m)+":"+str(music_s)
new_logo=pygame.transform.rotate(logo_img,angle)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment