Commit fd059dc3 by BellCodeEditor

save project

parent bf3084a1
Showing with 15 additions and 3 deletions
......@@ -56,10 +56,11 @@ while True:
click += 1
if click % 2 == 0:
play_button = stop_img
pygame.mixer.music.unpause()
pygame.mixer.music.unpause()
else:
play_button = play_img
pygame.mixer.music.pause()
if x > 420 and x < 520 and y > 350 and y < 450:#暂停
pygame.mixer.music.stop()
play_button = stop_img
......@@ -67,6 +68,7 @@ while True:
click += 2
else:
click += 1
if pygame.mixer.music.get_busy() == False:
num += 1
......@@ -74,7 +76,16 @@ while True:
num = 0
pygame.mixer.music.load(music_list[num])
pygame.mixer.music.play()
# 旋转图片(注意:这里要搞一个新变量,存储旋转后的图片)
qq = pygame.mixer.Sound(music_list[num])
time_1 = qq.get_length()
time_2 = int(time_1)
time_3 = time_2//60
time_4 = time_2%60
info2 = str(time_3) + ":" + str(time_4)
eaxm2=play_get.render('/'+info2,True,(255,255,255))
# 旋转图片(注意:这里要搞一个新变量,存储旋转后的图片)
new_logo = pygame.transform.rotate(logo_img, angle)#旋转图片,会生成一个新图片,第二个参数是角度,正数就是逆时针,负数就是顺时针
# 校正旋转图片的中心点
newRect = new_logo.get_rect(center=(320, 200))
......@@ -96,7 +107,8 @@ while True:
screen.blit(new_logo, pos) # 中间logo图
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
screen.blit(eaxm,(0,0))
screen.blit(eaxm,(120,440))
screen.blit(eaxm2,(170,440))
# 刷新画面
pygame.display.update()
......
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