Commit 0cd2e690 by BellCodeEditor

save project

parent cf0c4dcc
Showing with 19 additions and 3 deletions
...@@ -69,14 +69,16 @@ while True: ...@@ -69,14 +69,16 @@ while True:
num -= 1 num -= 1
if num < 0: if num < 0:
num = len(music_list) - 1 num = len(music_list) - 1
pygame.mixer.music.load(path + "\\" + music_list[num]) pygame.mixer.music.load(nupath + "\\" + music_list[m])
pygame.mixer.music.play() pygame.mixer.music.play()
play_button = stop_img play_button = stop_img
if click % 2 == 0: if click % 2 == 0:
click += 2 click += 2
else: else:
click += 1 click += 1
music_time=pygame.mixer.Sound(path + "\\" + music_list[num])
music_time_legth=music.get_length()
music_time_legth=int(music_lenghth)
if pygame.mixer.music.get_busy() == False: if pygame.mixer.music.get_busy() == False:
num += 1 num += 1
if num > len(music_list)-1: if num > len(music_list)-1:
...@@ -85,9 +87,19 @@ while True: ...@@ -85,9 +87,19 @@ while True:
p=int(p/1000) p=int(p/1000)
p_m=p//60 p_m=p//60
p_s=p%60 p_s=p%60
if p_s<10:
p_s="0"+str(play_s)
info=str(p_m)+":"+str(p_s)
music_m=music_length//60
music_s=music_length%60
if music_s<10
music_s="0"+str(music_s)
info=str(p_m)+":"+str(p_s) info=str(p_m)+":"+str(p_s)
pygame.mixer.music.load(path + "\\" + music_list[num]) pygame.mixer.music.load(path + "\\" + music_list[num])
pygame.mixer.music.play() pygame.mixer.music.play()
music_time=pygame.mixer.Sound(path + "\\" + music_list[num])
music_time_legth=music.get_length()
music_time_legth=int(music_lenghth)
new_logo = pygame.transform.rotate(logo_img, angle) new_logo = pygame.transform.rotate(logo_img, angle)
newRect=new_logo.get_rect(center=(320,200)) newRect=new_logo.get_rect(center=(320,200))
pos=(newRect[0],newRect[1]) pos=(newRect[0],newRect[1])
...@@ -98,5 +110,8 @@ while True: ...@@ -98,5 +110,8 @@ while True:
screen.blit(new_logo,pos) screen.blit(new_logo,pos)
screen.blit(last_img, (120, 350)) screen.blit(last_img, (120, 350))
screen.blit(next_img, (420, 350)) screen.blit(next_img, (420, 350))
scoreSurf=basic_font.render(info,True,(255,255,255))
screen.blit(scoreSurf,(120,440))
scoreSurf2=basic_font.render("/"+info2,True,(0,0,0))
screen.blit(scoreSurf2,(170,440))
pygame.display.update() 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