Commit dbd6008c by BellCodeEditor

save project

parent 0aaec8ae
Showing with 10 additions and 9 deletions
......@@ -74,8 +74,8 @@ while True:
pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play()
play_button = stop_img
if click % 2 == 0:
click += 2
if click % 2 == 0:#如果在播放
click += 2#仍然播放
else:
click += 1
......@@ -92,11 +92,11 @@ while True:
if play_button == stop_img:#如果是播放状态
angle += 1 #增加度数(转动)
play_time = pygame.mixer.music.get_pos()
play_musictime = int(play_time/1000)
play_m = play_musictime//60
play_s = play_musictime%60
info = str(play_m) + ':' + str(play_s)
play_time = pygame.mixer.music.get_pos()#获取毫秒
play_musictime = int(play_time/1000)#化毫秒为秒,化为整数
play_m = play_musictime//60#化秒为分
play_s = play_musictime%60#化秒为秒
info = str(play_m) + ':' + str(play_s)#内容为字符串分与秒
# 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮
......@@ -104,7 +104,7 @@ while True:
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
scoreSurf = neuropol.render(info,True,(210,249,102))
screen.blit(scoreSurf,(50,450))
scoreSurf = neuropol.render(info,True,(210,249,102))#设置文本的内容,抗锯齿,颜色
screen.blit(scoreSurf,(50,450))#渲染
# 刷新画面
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