Fix windows icon and exit
This commit is contained in:
9
main.py
9
main.py
@@ -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')
|
||||
|
||||
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
BIN
res/logo/icon.png
Normal file
BIN
res/logo/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 107 KiB |
Reference in New Issue
Block a user