Commit e5bbd8a1 by BellCodeEditor

auto save

parent 2ae72207
Showing with 11 additions and 1 deletions
...@@ -14,7 +14,7 @@ next_img = pygame.image.load('next.png') # 下一曲按钮 ...@@ -14,7 +14,7 @@ next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮 logo_img = pygame.image.load('logo.png') # 下一曲按钮
music_list = [] music_list = []
path = "C:\\Users\\Administrator\\Desktop\\新建文件夹" path = "C:\\Users\\Administrator\\Desktop"
filelist = os.listdir(path) filelist = os.listdir(path)
num = -1 num = -1
for i in filelist: for i in filelist:
...@@ -90,6 +90,16 @@ while True: ...@@ -90,6 +90,16 @@ while True:
long_2=long_1.get_rect(center=(320,180)) long_2=long_1.get_rect(center=(320,180))
print=(long_2) print=(long_2)
pos=(long_2[0],long_2[1]) pos=(long_2[0],long_2[1])
music=pygame.mixer.get_pos()//1000
time_1=music_time//60
time_2=music_time%60
if time_2<10:
time_2="0"+srt(time_2)
text=my.font.render(str(time_2)+":"+str(time_2),True,(0,225,0))
# 绘制画面 # 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景 screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮 screen.blit(play_button, (270, 330)) # 暂停按钮
......
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