Skip to content
This repository was archived by the owner on May 25, 2022. It is now read-only.

update Readme.md and update Speed_Game #545

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add FinishPage class
  • Loading branch information
jinyesong committed Nov 27, 2021
commit 1a61df33dcc7be3cfefa00401c9556d29c742ffd
11 changes: 11 additions & 0 deletions projects/Speed_Game/windows/main.py
Original file line number Diff line number Diff line change
@@ -247,7 +247,18 @@ def passBtn_click(self, tk, canv, check_img):
def delete_img(self, canv, dele_img_name):
canv.delete(dele_img_name)

class FinishPage(tk.Frame):
def __init__(self, master):
tk.Frame.__init__(self, master)
ImagePath = 'halloween.png'
canv = tk.Canvas(self, width=600, height=500, bg='white')
canv.pack(side='bottom')
self.img = ImageTk.PhotoImage(Image.open(ImagePath).resize((600, 500), Image.ANTIALIAS))
canv.create_image(0, 0, anchor="nw", image=self.img)

labelFont = tkFont.Font(family="Arial", size=40, weight="bold")
canv.create_text((600 // 2), (500 // 2) - 50, fill="white", text="total score : " + str(correct_count)+ "/15", font=labelFont)
canv.create_text((600 // 2), (500 // 2) + 50, fill="white", text="Good Job!", font=labelFont)

if __name__ == "__main__":
pygame.init()