import pygame
import sys
from menu import Menu  # Menü importieren
import settings

def main():
    pygame.init()
    screen = pygame.display.set_mode((settings.SCREEN_WIDTH, settings.SCREEN_HEIGHT))
    pygame.display.set_caption("The Last Ollie \n A Fred Story")
    clock = pygame.time.Clock()

    # Menü initialisieren
    menu = Menu(screen)

    running = True
    while running:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                running = False
            menu.handle_event(event)

        menu.draw()
        pygame.display.flip()
        clock.tick(settings.FPS)

    pygame.quit()
    sys.exit()

if __name__ == "__main__":
    main()