Beispiel #1
0
def show_main_window(app: QApplication, args):
    options = Options.with_default_data_dir()

    if not load_options_from_disk(options):
        raise SystemExit(1)

    from randovania.gui.main_window import MainWindow
    main_window = MainWindow(options, getattr(args, "preview", False))
    app.main_window = main_window
    main_window.show()
    main_window.request_new_data()
Beispiel #2
0
def show_main_window(app: QApplication, is_preview: bool):
    options = Options.with_default_data_dir()
    preset_manager = PresetManager(options.data_dir)

    for old_preset in options.data_dir.joinpath("presets").glob(
            "*.randovania_preset"):
        old_preset.rename(
            old_preset.with_name(
                f"{old_preset.stem}.{Preset.file_extension()}"))

    if not load_options_from_disk(options):
        raise SystemExit(1)

    if not load_user_presets(preset_manager):
        raise SystemExit(2)

    from randovania.gui.main_window import MainWindow
    main_window = MainWindow(options, preset_manager, is_preview)
    app.main_window = main_window
    main_window.show()
    main_window.request_new_data()