Commit c88802de by BellCodeEditor

save project

parent 74b81c0a
Showing with 5 additions and 1 deletions
...@@ -8,11 +8,13 @@ last = pygame.image.load('last.png') ...@@ -8,11 +8,13 @@ last = pygame.image.load('last.png')
logo = pygame.image.load('logo.png') logo = pygame.image.load('logo.png')
next = pygame.image.load('next.png') next = pygame.image.load('next.png')
stop = pygame.image.load('stop.png') stop = pygame.image.load('stop.png')
play = pygame.image.load('play.png')
font = pygame.font.Font('neuropol.ttf',20) font = pygame.font.Font('neuropol.ttf',20)
pygame.mixer.music.load('test.wav') pygame.mixer.music.load('test.wav')
fps = pygame.time.Clock() fps = pygame.time.Clock()
volume = 0.5 volume = 0.5
click = 0 click = 0
play_botton = stop
pygame.mixer.music.set_volume(volume) pygame.mixer.music.set_volume(volume)
while True: while True:
...@@ -32,15 +34,17 @@ while True: ...@@ -32,15 +34,17 @@ while True:
if click == 0: if click == 0:
click = 1 click = 1
pygame.mixer.music.pause() pygame.mixer.music.pause()
play_botton = play
else: else:
click = 0 click = 0
pygame.mixer.music.unpause() pygame.mixer.music.unpause()
play_botton = stop
if pygame.mixer.music.get_busy() == False: if pygame.mixer.music.get_busy() == False:
pygame.mixer.music.play() pygame.mixer.music.play()
screen.blit(background,(0,0)) screen.blit(background,(0,0))
screen.blit(logo,(170,60)) screen.blit(logo,(170,60))
screen.blit(stop,(270,330)) screen.blit(play_botton,(270,330))
screen.blit(last,(120,350)) screen.blit(last,(120,350))
screen.blit(next,(420,350)) screen.blit(next,(420,350))
pygame.display.update() 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