Commit c4d70e2b by BellCodeEditor

save project

parent 7116bfc2
Showing with 10 additions and 2 deletions
...@@ -12,7 +12,7 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮 ...@@ -12,7 +12,7 @@ stop_img = pygame.image.load('stop.png') # 暂停按钮
last_img = pygame.image.load('last.png') # 上一曲按钮 last_img = pygame.image.load('last.png') # 上一曲按钮
next_img = pygame.image.load('next.png') # 下一曲按钮 next_img = pygame.image.load('next.png') # 下一曲按钮
logo_img = pygame.image.load('logo.png') # 下一曲按钮 logo_img = pygame.image.load('logo.png') # 下一曲按钮
font=pygame.font.Font('neuropol.ttf',18)
music_list = [] music_list = []
path = "C:\\Users\\72727\\Desktop\\test" path = "C:\\Users\\72727\\Desktop\\test"
filelist = os.listdir(path) filelist = os.listdir(path)
...@@ -93,13 +93,20 @@ while True: ...@@ -93,13 +93,20 @@ while True:
new_logo=pygame.transform.rotate(logo_img,angle) new_logo=pygame.transform.rotate(logo_img,angle)
new_rect=new_logo.get_rect(center=(320,200)) new_rect=new_logo.get_rect(center=(320,200))
pos=new_rect[0],new_rect[1] pos=new_rect[0],new_rect[1]
play_time=pygame.mixer.music.get_pos()
play_time=int(play_time/1000)
play_m=play_time//60
play_s=play_time%60
info=str(play_m)+':'+str(play_s)
text=font.render(info,True,(255,255,255))
# 绘制画面 # 绘制画面
screen.blit(bg_img, (0, 0)) # 填充背景 screen.blit(bg_img, (0, 0)) # 填充背景
screen.blit(play_button, (270, 330)) # 暂停按钮 screen.blit(play_button, (270, 330)) # 暂停按钮
screen.blit(new_logo, pos) # 中间logo图 screen.blit(new_logo, pos) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲 screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲 screen.blit(next_img, (420, 350)) # 下一曲
screen.blit(text,(150,450))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPSCLOCK.tick(80) FPSCLOCK.tick(80)
\ 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