Commit 44a442ea by BellCodeEditor

auto save

parent 0b84ea20
Showing with 2 additions and 5 deletions
......@@ -15,7 +15,7 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮
my_font = pygame.font.Font('neuropol.ttf',18)
music_list = []
path = "C:\Users\tang\Documents\pygame_lesson6_diy1"
path = "C:\\Users\\tang\\Documents\\pygame_lesson6_diy1"
filelist = os.listdir(path)
num = -1
for i in filelist:
......@@ -89,6 +89,7 @@ while True:
click += 2
else:
click += 1
if pygame.mixer.music.get_busy() == False:
num += 1
......@@ -122,7 +123,6 @@ while True:
music_s = "0"+str(music_s)
info2 = str(music_m)+":"+str(music_s)
#print(play_time)
#图片旋转
new_logo = pygame.transform.rotate(logo_img,angle)
#返回一个元组:前两个数值代表左上角数值,后两个数值代表图片大小
......@@ -131,18 +131,15 @@ while True:
pos = (new_rect[0],new_rect[1])
if play_button == stop_img:
angle+=1
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮
screen.blit(new_logo, pos) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
#歌曲进度的字体渲染
scoreSurf = my_font.render(info,True,(255,255,255))
screen.blit(scoreSurf,(120,440))
#加载总时长的渲染
scoreSurf2 = my_font.render('/'+info2,True,(0,0,0))
screen.blit(scoreSurf2,(180,440))
......
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