Commit 08bb56c3 by BellCodeEditor

save project

parent 85f2f20b
Showing with 8 additions and 3 deletions
......@@ -15,6 +15,7 @@ logo_img = pygame.image.load('logo.png') # 下一曲按钮
my_font = pygame.font.Font('neuropol.ttf', 18)
music_list = []
path = "C:\\Users\\EDZ\\Desktop\\music"
filelist = os.listdir(path)
......@@ -29,6 +30,7 @@ play_button = stop_img
a=0
ab=pygame.transform.rotate(logo_img,a)
a1,a2=0,0
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -81,15 +83,16 @@ while True:
click += 2
else:
click += 1
p=pygame.mixer.music.get_pos()
p=int(p/1000)
pm=p//60
ps=p%60
pms=str(pm)+':'+str(ps)
print(pms)
txt=my_font.render(pms,True,(0,0,0))
if pygame.mixer.music.get_busy() == False:
......@@ -110,5 +113,6 @@ while True:
screen.blit(last_img, (120, 350)) # 上一曲
screen.blit(next_img, (420, 350)) # 下一曲
# 刷新画面
screen.blit(txt,(100,420))
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