Browse Source

interface un peu mieux

master
corentin.bollet 12 months ago
parent
commit
e8aea337f5
  1. BIN
      __pycache__/File.cpython-38.pyc
  2. BIN
      __pycache__/Pile.cpython-38.pyc
  3. BIN
      __pycache__/listeChaine.cpython-38.pyc
  4. 30
      interface.py

BIN
__pycache__/File.cpython-38.pyc

Binary file not shown.

BIN
__pycache__/Pile.cpython-38.pyc

Binary file not shown.

BIN
__pycache__/listeChaine.cpython-38.pyc

Binary file not shown.

30
interface.py

@ -1,9 +1,13 @@
import tkinter as tk
from tkinter import messagebox
from random import choice, randint
from PIL import Image
pique = "๐Ÿ‚ก๐Ÿ‚ข๐Ÿ‚ฃ๐Ÿ‚ค๐Ÿ‚ฅ๐Ÿ‚ฆ๐Ÿ‚ง๐Ÿ‚จ๐Ÿ‚ฉ๐Ÿ‚ช๐Ÿ‚ซ๐Ÿ‚ฌ๐Ÿ‚ญ๐Ÿ‚ฎ"
coeur = '๐Ÿ‚ฑ๐Ÿ‚ฒ๐Ÿ‚ณ๐Ÿ‚ด๐Ÿ‚ต๐Ÿ‚ถ๐Ÿ‚ท๐Ÿ‚ธ๐Ÿ‚น๐Ÿ‚บ๐Ÿ‚ป๐Ÿ‚ผ๐Ÿ‚ฝ๐Ÿ‚พ'
carreau = "๐Ÿƒ๐Ÿƒ‚๐Ÿƒƒ๐Ÿƒ„๐Ÿƒ…๐Ÿƒ†๐Ÿƒ‡๐Ÿƒˆ๐Ÿƒ‰๐ŸƒŠ๐Ÿƒ‹๐ŸƒŒ๐Ÿƒ๐ŸƒŽ"
trefle = "๐Ÿƒ‘๐Ÿƒ’๐Ÿƒ“๐Ÿƒ”๐Ÿƒ•๐Ÿƒ–๐Ÿƒ—๐Ÿƒ˜๐Ÿƒ™๐Ÿƒš๐Ÿƒ›๐Ÿƒœ๐Ÿƒ๐Ÿƒž"
cartes = pique + coeur + carreau + trefle
class Interface(tk.Frame):
def __init__(self, master):
@ -12,15 +16,21 @@ class Interface(tk.Frame):
self.grid(row=0)
#revoir le design
self.menu = tk.Frame()
title = tk.Label(self.menu, text="Bataille",font=("eufm10", 42))
title.grid(row=0)
#image ne fonctionne pas
canvas= tk.Canvas(self.menu, width= 300, height=300)
image = tk.PhotoImage(file='title_img.gif')
canvas.create_image(50, 10, image=image)
canvas.grid(row=2)
C = tk.Canvas (self.menu, bg="black",height=250, width=300)
coord = 10, 50, 240, 210
C.grid(row=0)
#image ne fonctionne pas
#canvas= tk.Canvas(self.menu, width= 300, height=300)
#image = tk.PhotoImage(file='title_img.png')
#canvas.create_image(50, 10, image=image)
#canvas.grid(row=2)
for i in range(20):
C.create_text(randint(0,300),randint(0,250),fill="white",font="Times 20 italic bold",text=choice(cartes))
titre = tk.Label(self.menu, text="Bataille",bg="grey", fg="white",font=("eufm10", 42))
titre.grid(row=0)
@ -42,7 +52,7 @@ class Interface(tk.Frame):
if __name__ == "__main__":
root = tk.Tk()
root.title("Hello World!")
root.title("Bataille")
root.geometry("300x300")
hello_frame = Interface(root)
hello_frame.mainloop()

Loadingโ€ฆ
Cancel
Save