Fix windows icon and exit

This commit is contained in:
2019-03-27 18:50:40 +01:00
parent e1c5d55684
commit 270920d117
3 changed files with 8 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
import tkinter as tk
import datetime as dt
import color
import sys
from game import fall, osu, pong, space
from PIL import Image, ImageTk
from time import sleep
@@ -75,7 +76,12 @@ def main():
canvas_space.place(x = 404, y = 304)
# Logo
win.iconbitmap('res/logo/main.ico')
if sys.platform.startswith('win'):
win.iconbitmap('res/logo/icon.ico')
else:
logo = tk.PhotoImage('res/logo/icon.png')
win.tk.call('wm', 'iconphoto', win._w, logo)
tk.Label(win, image = image_center, bg = color.LEVEL_1).place(x = 401 - 32, y = 301 - 32)
# Score
@@ -116,6 +122,7 @@ def end():
# Terminate
win.destroy()
sys.exit(0)
# Main
print('Bienvenue dans le jeu QuadraLudi')

View File

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 127 KiB

BIN
res/logo/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB