Commit e98608b3 by BellCodeEditor

save project

parent 239703aa
Showing with 20 additions and 8 deletions
......@@ -12,11 +12,14 @@ 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.font.Font('neuropol.ttf',14)
q=logo_img
a=0
music_list = []
path = "C:\\Users\\Think\\Desktop\\nb"
path = "C:\\Users\\mk\\Desktop\\新建文件夹"
filelist =os.listdir(path)
num = -1
for i in filelist:
if i[-4:] == ".wav" or i[-4:] == ".ogg":
......@@ -86,18 +89,26 @@ while True:
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
#s.Surface.get_rect(center=(320,200))
else:
w=pygame.transform.rotate(q,a)
s=w.get_rect(center=(320,200))
pos=(s[0],s[1])
#else:
o=pygame.mixer.music.get_pos()
b=int(o/1000)
e=b//60
y=b%60
info=str(e)+":"+str(y)
w=pygame.transform.rotate(q,a)
s=w.get_rect(center=(320,200))
pos=(s[0],s[1])
if play_button==stop_img:
a=a+1
screen.blit(w, pos)
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮
#screen.blit(w, pos) # 中间logo图
screen.blit(w, pos) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
screen.blit(next_img, (420, 350))
scoreSf=basic_font.render(info,True,(255,255,255))
screen.blit(scoreSf,(120,440)) # 下一曲
# 刷新画面
pygame.display.update()
\ No newline at end of file
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