added style and error checking
This commit is contained in:
parent
2e700da34a
commit
171a18b946
1 changed files with 4 additions and 2 deletions
6
GUI.py
6
GUI.py
|
@ -27,7 +27,7 @@ class Main_Window:
|
||||||
self.exit_button.bind('<Button-1>', self.close)
|
self.exit_button.bind('<Button-1>', self.close)
|
||||||
|
|
||||||
|
|
||||||
Style().configure("Menu.TButton", font=("Lucida", 25 ))
|
Style().configure("Menu.TButton", font=("Lucida", 25))
|
||||||
Style().configure("Quit.TButton", font=("Lucida", 15))
|
Style().configure("Quit.TButton", font=("Lucida", 15))
|
||||||
|
|
||||||
logging.info("GUI Generated.")
|
logging.info("GUI Generated.")
|
||||||
|
@ -35,7 +35,9 @@ class Main_Window:
|
||||||
def play_game(self, event):
|
def play_game(self, event):
|
||||||
logging.info("Game Started.")
|
logging.info("Game Started.")
|
||||||
self.master.withdraw()
|
self.master.withdraw()
|
||||||
game.initialise(self.master, None)
|
exit_code = game.initialise(self.master, None)
|
||||||
|
if exit_code == "player collision":
|
||||||
|
self.title["text"] = "You Lost, Try Again?"
|
||||||
|
|
||||||
def close(self, event):
|
def close(self, event):
|
||||||
logging.critical("Closing Main Window.")
|
logging.critical("Closing Main Window.")
|
||||||
|
|
Reference in a new issue