diff --git a/main.py b/main.py index d0bf40f..d559392 100644 --- a/main.py +++ b/main.py @@ -1,7 +1,18 @@ +import pygame from modules.Game import Game +from modules.GameMenu import menu def main(): + running = True + show_menu = True + while running: + if show_menu: + menu() + show_menu = False + else: + running = False + pygame.display.flip() game = Game() game.start() diff --git a/modules/GameMenu.py b/modules/GameMenu.py new file mode 100644 index 0000000..7c91e44 --- /dev/null +++ b/modules/GameMenu.py @@ -0,0 +1,17 @@ +import sys +from pygame import * + + +def menu(): + init() + DISPLAYSURF = display.set_mode((480, 600)) + display.set_caption('The Lonely Shooter') + background = image.load('styles/background.jpeg').convert() + DISPLAYSURF.blit(background, background.get_rect()) + display.update() + while True: + events = event.poll() + if events.type == KEYDOWN and events.key == K_RETURN: + break + elif events.type == QUIT: + sys.exit() diff --git a/styles/Retro.ttf b/styles/Retro.ttf new file mode 100644 index 0000000..02baf66 Binary files /dev/null and b/styles/Retro.ttf differ diff --git a/styles/background.jpeg b/styles/background.jpeg new file mode 100644 index 0000000..26b6ad0 Binary files /dev/null and b/styles/background.jpeg differ