예제 #1
0
def mainMenuFunctions(answer):
    # Check which option was selected
    if answer == "0":
        # Open the generation menu
        options = ["Option_To_Be_Done"]
        gu.textMenu("Generation Menu", options, "Back to Main Menu",
                    mainMenuFunctions)
예제 #2
0
def main():
    # Mark globals
    global MODS_AVAILABLE
    global MODS_SELECTED
    global GLOBAL_DIR
    global BACKUP_EXT
    global SETTINGS_FILE
    global SETTINGS

    # Check if a global json backup already exists
    backupGlobalJson()

    # Check if a settings file has been made yet
    createSettingsFile()

    # Load the settings from the file
    with open(SETTINGS_FILE, "r") as sFile:
        SETTINGS = json.load(sFile)

    # Populate the selected mods list
    populateModsFromSettings()

    # Populate the avalible mods list
    for fileName in os.listdir("../"):
        if os.path.basename(
                os.getcwd()) != fileName and os.path.isdir("../" + fileName):
            MODS_AVAILABLE.append(fileName)

    # Show the main menu
    mainOptions = [
        "Select Mods", "Play with Selected Mods", "Play without Mods",
        "Utilities", "Options"
    ]
    gu.textMenu("Brigador Mod Packer", mainOptions, "Quit", mainMenuOptions)
예제 #3
0
def main():
    # Welcome message
    print("\n<< Welcome to GPT-2M Main Control >>")

    # Enter menu functions
    options = ["Generation Menu"]
    gu.textMenu("GPT-2M Main Menu", options, "Quit", mainMenuFunctions)

    # Safe to exit message
    print(
        "\nGPT-2M has shutdown successfully.\nIt is now safe to close this window."
    )
예제 #4
0
def menuMain(choice):
    if choice == '0':
        # Process an order
        choiceProcessOrder()
    elif choice == '1':
        # Run the order creation wizard
        choiceOrderWizard()
    elif choice == '2':
        # Convert Image
        choiceConvertItem('image')
    elif choice == '3':
        # Convert Video
        choiceConvertItem('video')
    elif choice == '4':
        # Settings Menu
        gu.textMenu('AscSee Settings', ['Set Font File'], 'Back', menuSettings)
예제 #5
0
def main():
    # Indicate global
    global MERCER

    # Startup Mercer in specified mode
    mode = utils.askUserYesNo("Start in Debug Mode?", True)
    MERCER = mercerControl.MERCER(mode)

    # Welcome message
    print("\n<< Welcome to Mercer Main Control >>")

    # Enter menu functions
    options = ["Learning Menu", "Generation Menu", "Administration Menu"]
    utils.textMenu("Mercer Main Menu", options, "Save and Quit",
                   mainMenuFunctions)

    # Exit Mercer safely
    MERCER.exitMercer()

    # Safe to exit message
    print(
        "\nMercer has shutdown successfully.\nIt is now safe to close this window."
    )
예제 #6
0
def mainMenuFunctions(answer):
    # Because Python Switch statements don't exist
    if answer == "0":
        # Open Learning Menu
        options = ["Learn from File", "Learn from Subreddit"]
        utils.textMenu("Learning Menu", options, "Back to Main Menu",
                       learningMenuFunctions)
    elif answer == "1":
        # Open Generation Menu
        options = [
            "Generate Sentence", "Write to File", "Write to Console",
            "Manually Set Word Type"
        ]
        utils.textMenu("Generation Menu", options, "Back to Main Menu",
                       generationMenuFunctions)
    elif answer == "2":
        # Open Admin Menu
        options = [
            "Log Dictionary", "Show Dictionary Statistics",
            "Toggle Debug Mode", "Set Max Generation Attempts",
            "Set Max Commonality Difference"
        ]
        utils.textMenu("Administration Menu", options, "Back to Main Menu",
                       adminMenuFunctions)
예제 #7
0
def settingsMenu():
    # Present the settings menu
    choices = ["Change if Mod Packer remains open when Brigador starts"]
    gu.textMenu("Settings", choices, "Back", settingsMenuOptions)
예제 #8
0
def utilitiesMenu():
    # Show the utilities menu
    choices = ["Generate a Mod Details file", "Recompile Selected Mods"]
    gu.textMenu("Utilities", choices, "Back", utilitiesMenuOptions)
예제 #9
0
def main():
    # Set the ASCII Converter to Verbose
    ac.toggleVerbose()

    # Present the main menu
    gu.textMenu('AscSee', ['Process Order', 'Order Creation Wizard', 'Convert Image', 'Convert Video', 'Settings'], 'Quit', menuMain)