v0.3
Sauvegarde du 10/04/2020
This commit is contained in:
parent
276edc9dad
commit
cca86ee157
5 changed files with 43 additions and 1 deletions
9
main.pyw
9
main.pyw
|
@ -14,5 +14,14 @@ for file in os.listdir(PATH_MODULE): # On cherche les modules dans leur dossier
|
||||||
exec(module.read()) # On les executes
|
exec(module.read()) # On les executes
|
||||||
|
|
||||||
|
|
||||||
|
class AppClass(): # Classe du "moteur" du jeu
|
||||||
|
def __init__(self): # Initialisation
|
||||||
|
classModule["display"].write("lancer une partie")
|
||||||
|
|
||||||
|
def navigation(key):
|
||||||
|
pass
|
||||||
|
# Navigation avec les touches du simon dans le menu principal
|
||||||
|
|
||||||
|
App = AppClass()
|
||||||
|
|
||||||
mainloop() # On "active" la fênetre
|
mainloop() # On "active" la fênetre
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
class button():
|
||||||
|
def __init__(self): # Cette fonction est automatiquement éxécuter lors de la création de l'objet
|
||||||
|
self.frame = LabelFrame(Fen, text = "Button") # On créer une sous-fenêtre
|
||||||
|
self.frame.grid(row = 2, column = 3, sticky = "NEWS") # On l'affiche
|
||||||
|
|
||||||
|
self.big_but = Button(self.frame, text = "", background = "lightgray", width = 8, height = 5, relief = GROOVE) # On créer le boutton du haut
|
||||||
|
self.big_but.grid(row = 1, column = 1)
|
||||||
|
|
||||||
|
|
||||||
|
classModule["button"] = button()
|
|
@ -6,5 +6,8 @@ class display():
|
||||||
self.label = Label(self.frame, text = "ici on affichera le texte")
|
self.label = Label(self.frame, text = "ici on affichera le texte")
|
||||||
self.label.grid(row = 1, column = 1, sticky = "NEWS")
|
self.label.grid(row = 1, column = 1, sticky = "NEWS")
|
||||||
|
|
||||||
|
def write(self, text):
|
||||||
|
self.label.config(text = text)
|
||||||
|
|
||||||
|
|
||||||
classModule["display"] = display()
|
classModule["display"] = display()
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
class morse():
|
||||||
|
def __init__(self): # Cette fonction est automatiquement éxécuter lors de la création de l'objet
|
||||||
|
self.frame = LabelFrame(Fen, text = "Morse") # On créer une sous-fenêtre
|
||||||
|
self.frame.grid(row = 2, column = 2, sticky = "NEWS") # On l'affiche
|
||||||
|
|
||||||
|
self.frame.grid_rowconfigure(1, weight = 1) # tout les objets seront centré horizontalement
|
||||||
|
self.frame.grid_columnconfigure(1, weight = 1) # tout les objets seront centré verticalement
|
||||||
|
|
||||||
|
|
||||||
|
self.morse = Label(self.frame, text = "", background = "lightgray", relief = SUNKEN, width = 2, height = 1)
|
||||||
|
self.morse.grid(row = 1, column = 1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
classModule["morse"] = morse()
|
|
@ -14,9 +14,13 @@ class simon():
|
||||||
self.dico_but["Right"] = Button(self.frame, text = "", background = "indianred", width = 2, height = 1) # On créer le boutton à droite
|
self.dico_but["Right"] = Button(self.frame, text = "", background = "indianred", width = 2, height = 1) # On créer le boutton à droite
|
||||||
self.dico_but["Right"].grid(row = 3, column = 3)
|
self.dico_but["Right"].grid(row = 3, column = 3)
|
||||||
|
|
||||||
self.dico_but["Down"] = Button(self.frame, text = "", background = "lightyellow", width = 2, height = 1) # On créer le boutton en bas
|
self.dico_but["Down"] = Button(self.frame, text = "", background = "lightyellow", width = 2, height = 1) # On créer le boutton
|
||||||
self.dico_but["Down"].grid(row = 4, column = 2)
|
self.dico_but["Down"].grid(row = 4, column = 2)
|
||||||
|
|
||||||
|
|
||||||
|
def MainMenu(self):
|
||||||
|
pass
|
||||||
|
# Bind les touches pour agir sur le menu principal
|
||||||
|
|
||||||
|
|
||||||
classModule["simon"] = simon()
|
classModule["simon"] = simon()
|
||||||
|
|
Loading…
Reference in a new issue