Commit 74046484 by BellCodeEditor

save project

parent 247067ec
Showing with 8 additions and 3 deletions
...@@ -2,6 +2,7 @@ import pygame ...@@ -2,6 +2,7 @@ import pygame
from pygame import locals from pygame import locals
import os import os
import Surface import Surface
pygame.mixer.Sound()
FPS = pygame.time.Clock() FPS = pygame.time.Clock()
pygame.init() # 初始化 pygame.init() # 初始化
# 创建窗口 # 创建窗口
...@@ -90,7 +91,11 @@ while True: ...@@ -90,7 +91,11 @@ while True:
play_s=play_time%60 play_s=play_time%60
info = str(play_m) + ":" +str(play_s) info = str(play_m) + ":" +str(play_s)
Sound.get_length()
music_m = play_lengh//60
music_s = play_lengh%60
if play_s < 10:
play_s = "0" +str(play_s)
...@@ -107,4 +112,5 @@ while True: ...@@ -107,4 +112,5 @@ while True:
screen.blit(last_img, (120, 350)) # 上一曲 screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲 screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
\ No newline at end of file pygame.mixer.music()
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