From 03afd42fdcd52e4a827016828c4ad286de320078 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Thu, 31 Aug 2023 22:47:58 +0200 Subject: Updated 5 files, added 2 files and deleted 337 files (automated) --- main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index 6459a41..6deda5a 100644 --- a/main.py +++ b/main.py @@ -10,7 +10,7 @@ import pygame import sys sys.path.append("./src") -from src import audio, game, window, loader +from src import audio, window, loader, menu pygame.font.init() pygame.init() @@ -51,7 +51,7 @@ while running: clock.tick(25) else: - game.run(screen) + menu.show(screen) break except Exception as e: pygame.mixer.music.load("./assets/sounds/gui/error.ogg") @@ -72,8 +72,8 @@ while running: message = e.message if hasattr(e, 'message') else str(e) code = ("".join([hex(ord(i)).split("x")[1] for i in message]) + "00000000").upper() - screen.blit(pygame.font.Font("./assets/font/main.ttf", 20).render("An error has occurred and the game has stopped.", True, (255, 255, 255)), (200, 124)) - screen.blit(pygame.font.Font("./assets/font/main.ttf", 20).render("Error code: 0x" + code[0:8], True, (255, 255, 255)), (199, 144)) + screen.blit(pygame.font.Font("./assets/font/main.ttf", 20).render("An error has occurred and the game has stopped.", False, (255, 255, 255)), (200, 124)) + screen.blit(pygame.font.Font("./assets/font/main.ttf", 20).render("Error code: 0x" + code[0:8], False, (255, 255, 255)), (199, 144)) pygame.display.update() -- cgit