Commit 4d6e01ec by BellCodeEditor

save project

parent eb1e4622
Showing with 9 additions and 3 deletions
...@@ -3,6 +3,7 @@ from pygame import locals ...@@ -3,6 +3,7 @@ from pygame import locals
import os import os
pygame.init() pygame.init()
screen=pygame.display.set_mode((640,480)) screen=pygame.display.set_mode((640,480))
bg_img=pygame.image.load('background.png') bg_img=pygame.image.load('background.png')
play_img=pygame.image.load('play.png') play_img=pygame.image.load('play.png')
stop_img=pygame.image.load('stop.png') stop_img=pygame.image.load('stop.png')
...@@ -21,6 +22,7 @@ for i in filelist: ...@@ -21,6 +22,7 @@ for i in filelist:
music_list.append(i) music_list.append(i)
num=-1 num=-1
play_button=stop_img play_button=stop_img
angle=0
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type==locals.QUIT: if event.type==locals.QUIT:
...@@ -65,10 +67,13 @@ while True: ...@@ -65,10 +67,13 @@ while True:
num=0 num=0
pygame.mixer.music.load(path+'\\'+music_list[num]) pygame.mixer.music.load(path+'\\'+music_list[num])
pygame.mixer.music.play() pygame.mixer.music.play()
new_logo=pygame.transform.rotate(logo_img,-angle)
newRect=new_logo.get_rect(center =(320,200))
cos=(newRect[0],newRect[1])
angle=angle+1
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(last_img,(120,350)) screen.blit(last_img,(120,350))
screen.blit(next_img,(420,350)) screen.blit(next_img,(420,350))
screen.blit(logo_img,(170,60)) screen.blit(new_logo,cos)
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