Beispiel #1
0
def exit_game(screen: Af.Surface):
    Af.play(exit_sound)
    buttons = [
        mc.Button(240, 410, f"menu/buttons/3/1.png", False),
        mc.Button(580, 410, f"menu/buttons/3/2.png", True)
    ]
    if not mc.Exit("menu/exit/exit_game.png", screen, buttons).display_menu():
        Af.terminate_execution()
    return "main_menu"
Beispiel #2
0
def exit_game_menu(screen: Af.Surface):
    Af.play(exit_sound)
    buttons = [
        mc.Button(240, 410, f"menu/buttons/3/1.png", False),
        mc.Button(580, 410, f"menu/buttons/3/2.png", True)
    ]
    if not mc.Exit("menu/exit/exit_menu.png", screen, buttons).display_menu():
        Af.erase_active_user_data()
        return "main_menu"
    return "game_menu"
Beispiel #3
0
def delete_statistics(screen: Af.Surface):
    Af.play(change_menu_sound)
    buttons = [
        mc.Button(240, 410, f"menu/buttons/3/1.png", True),
        mc.Button(580, 410, f"menu/buttons/3/2.png", False)
    ]
    if mc.Exit("menu/exit/delete_account.png", screen, buttons).display_menu():
        user_name = Af.read_file_content("saves/active_user.txt",
                                         1)[0].split(" ")[0]
        verification_password = mc.Enter_Password(screen, True).display_menu()
        if verification_password == "main_menu":
            Af.play(delete_account_sound)
            Af.delete_user_account(user_name)
        return verification_password
    return "manage_us"
Beispiel #4
0
def exit_program(screen):
    # f.play(exit_sound)
    if mc.Exit("images/Menu/exit_menu.png", screen).display_menu():
        f.terminate_execution()
    return "main_menu"