Compare commits
5 commits
Author | SHA1 | Date | |
---|---|---|---|
a1ea8b4f90 | |||
bdc421b868 | |||
a7fbd07138 | |||
2c91ebe334 | |||
4990e8e8bc |
6 changed files with 8 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
# ISN-Projet-Emulateur
|
||||
Projet d'ISN de Raphaël Caron et Sebastian Zitouni.
|
||||
Projet d'ISN de Raphaël et Sebastian.
|
||||
|
||||
Plus d'informations sur le wiki du projet : https://github.com/raphael60650/ISN-Projet-Emulateur/wiki
|
||||
|
|
Binary file not shown.
5
main.pyw
5
main.pyw
|
@ -32,10 +32,13 @@ if not(os.path.exists("./statistic.pickle")):
|
|||
######## initialisation ########
|
||||
Fen = Tk()
|
||||
Fen.resizable(width = False, height = False)
|
||||
Fen.iconbitmap(PATH_ASSETS + "icon.ico")
|
||||
Fen.iconphoto(False, ImageTk.PhotoImage(file = PATH_ASSETS + "icon.ico"))
|
||||
Fen.title("Emulateur - Bombe")
|
||||
classModule = {} # Dictionnaire qui va contenir tout les modules afin qu'ils puissent intéragir entre eux
|
||||
|
||||
global DEFAULT_BG_COLOR
|
||||
DEFAULT_BG_COLOR = Fen.cget("background")
|
||||
|
||||
for file in os.listdir(PATH_MODULE): # On cherche les modules dans leur dossier
|
||||
with open(PATH_MODULE + file, "rb") as module: # On les ouvres en lecture
|
||||
exec(module.read()) # On les executes
|
||||
|
|
|
@ -40,7 +40,7 @@ class display():
|
|||
else: self.label.config(foreground = "gold", background = "indianred")
|
||||
|
||||
else:
|
||||
self.label.config(foreground = "black", background = "SystemButtonFace")
|
||||
self.label.config(foreground = "black", background = DEFAULT_BG_COLOR)
|
||||
|
||||
if self.time >= 0: # Vérification que le joueur n'ai pas dépassé le temps imparti
|
||||
self.chrono_event = Fen.after(1000, self.chrono)
|
||||
|
@ -104,7 +104,7 @@ class display():
|
|||
def reset(self): # Cette fonction est appelé a chaque fin de partie pour réinitialiser ce module
|
||||
if App.InfinityMode == False: # Si l'on n'est pas en mode infini
|
||||
Fen.after_cancel(self.chrono_event) # On désactive le chrono
|
||||
self.label.config(foreground = "black", background = "SystemButtonFace")
|
||||
self.label.config(foreground = "black", background = DEFAULT_BG_COLOR)
|
||||
|
||||
duration = time.time() - App.start_time
|
||||
duration_min, duration_sec = duration // 60, duration % 60
|
||||
|
|
|
@ -39,7 +39,7 @@ class morse():
|
|||
|
||||
self.SelectFen = Toplevel() # Créer une fenêtre secondaire.
|
||||
self.SelectFen.resizable(width = False, height = False)
|
||||
self.SelectFen.iconbitmap(PATH_ASSETS + "icon.ico") # Change l'icone
|
||||
self.SelectFen.iconphoto(False, ImageTk.PhotoImage(file = PATH_ASSETS + "icon.ico")) # Change l'icone
|
||||
self.SelectFen.title("Emulateur - Morse") # Change le titre
|
||||
self.SelectFen.protocol('WM_DELETE_WINDOW', lambda: "pass") # Rend la fenêtre non fermable
|
||||
self.HideSymbol()
|
||||
|
|
Loading…
Reference in a new issue