示例#1
0
void uisnapshot_save_dialog(video_canvas_t *canvas)
{
    APTR window;
    char *str;
    int save_roms=0;
    int save_disks=0;

    snapshot_canvas=canvas;

    window = mui_make_simple_window(build_gui(), translate_text(IDS_SAVE_SNAPSHOT_IMAGE));

    if (window != NULL) {
        mui_add_window(window);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            get(save_disks_check, MUIA_String_Contents, (APTR)&str);
            save_disks=atoi(str);
            get(save_roms_check, MUIA_String_Contents, (APTR)&str);
            save_roms=atoi(str);
            get(filename_check, MUIA_String_Contents, (APTR)&str);
            if (str!=NULL && *str!='\0')
            {
                if (machine_write_snapshot(str, save_roms, save_disks, 0) < 0)
                    ui_error(translate_text(IDS_CANNOT_WRITE_SNAPSHOT_S),str);
            }
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#2
0
文件: uisound.c 项目: AreaScout/vice
void ui_sound_record_settings_dialog(video_canvas_t *canvas)
{
    APTR window;
    int val;

    sound_canvas = canvas;

    window = mui_make_simple_window(build_gui_record(), translate_text(IDS_SOUND_RECORD_SETTINGS));

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from_record);
        set(format, MUIA_Cycle_Active, 1);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(ui_to_from_record);
            get(format, MUIA_Cycle_Active, (APTR)&val);
            resources_set_string("SoundRecordDeviceName", "");
            resources_set_string("SoundRecordDeviceName", ui_sound_formats[val]);
            ui_display_statustext(translate_text(IDS_SOUND_RECORDING_STARTED), 1);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#3
0
文件: uivideo.c 项目: AreaScout/vice
void ui_video_color_settings_dialog(video_canvas_t *canvas, char *gamma_res, char *tint_res, char *saturation_res, char *contrast_res, char *brightness_res)
{
    APTR window;

    video_canvas = canvas;
    ui_to_from_colors[0].resource = gamma_res;
    ui_to_from_colors[1].resource = tint_res;
    ui_to_from_colors[2].resource = saturation_res;
    ui_to_from_colors[3].resource = contrast_res;
    ui_to_from_colors[4].resource = brightness_res;

    window = mui_make_simple_window(build_gui_colors(), translate_text(IDS_COLOR_SETTINGS));

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from_colors);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(ui_to_from_colors);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#4
0
void ui_printer_settings_dialog(video_canvas_t *canvas, int ieee, int userport)
{
    APTR window;

    printer_canvas = canvas;
    intl_convert_mui_table(ui_printer_enable_translate, ui_printer_enable);
    intl_convert_mui_table(ui_printer_emulation_translate, ui_printer_emulation);
    ui_printer_driver[3] = translate_text(IDS_RAW);
    ui_plotter_driver[1] = translate_text(IDS_RAW);
    intl_convert_mui_table(ui_printer_output_type_translate, ui_printer_output_type);
 
    window = mui_make_simple_window(build_gui(ieee, userport), translate_text(IDS_PRINTER_SETTINGS));

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(ui_to_from);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#5
0
void ui_network_dialog(void)
{
    APTR window = mui_make_simple_window(build_gui(), translate_text(IDS_NETPLAY_SETTINGS));

    /* FIXME: Bad workaround */
    resources_set_value("EventSnapshotDir", (resource_value_t)"");

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from);
        set(window, MUIA_Window_Open, TRUE);
        switch (mui_run()) {
            case BTN_START_SERVER:
                ui_get_from(ui_to_from);
                if (network_start_server() < 0) {
                    ui_error(translate_text(IDMES_ERROR_STARTING_SERVER));
                }
                break;
            case BTN_CONNECT_TO:
                ui_get_from(ui_to_from);
                if (network_connect_client() < 0) {
                    ui_error(translate_text(IDMES_ERROR_CONNECTING_CLIENT));
                }
                break;
            case BTN_DISCONNECT:
                network_disconnect();
                break;
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#6
0
int mui_show_dialog(APTR gui, char *title, ui_to_from_t *data)
{
    APTR window = mui_make_ok_cancel_window(gui, title);

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(data);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(data);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }

    return 0;
}
void ui_vic20_drive_rom_settings_dialog(video_canvas_t *canvas)
{
    APTR window;

    rom_canvas = canvas;

    window = mui_make_simple_window(build_drive_gui(), translate_text(IDS_DRIVE_ROM_SETTINGS));

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from_drive);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(ui_to_from_drive);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#8
0
void ui_digimax_vic20_settings_dialog(void)
{
    APTR window;

    intl_convert_mui_table(ui_digimax_enable_translate, ui_digimax_enable);

    window = mui_make_simple_window(build_gui20(), translate_text(IDS_DIGIMAX_SETTINGS));

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from20);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(ui_to_from20);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#9
0
void ui_single_cia_model_dialog(void)
{
    APTR window;

    intl_convert_mui_table(ui_cia_models_translate, ui_cia_models);

    window = mui_make_simple_window(build_single_gui(), translate_text(IDS_CIA_MODEL_SETTINGS));

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from_single);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(ui_to_from_single);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#10
0
文件: uic64dtv.c 项目: AreaScout/vice
void ui_c64dtv_settings_dialog(video_canvas_t *canvas)
{
    APTR window;

    c64dtv_canvas = canvas;
    intl_convert_mui_table(ui_c64dtv_enable_translate, ui_c64dtv_enable);

    window = mui_make_simple_window(build_gui(), translate_text(IDS_C64DTV_SETTINGS));

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(ui_to_from);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#11
0
void ui_sid_settings128_dialog(void)
{
    APTR window;

    intl_convert_mui_table(ui_sid_samplemethod_translate, ui_sid_samplemethod);
    intl_convert_mui_table(ui_sid_enable_translate, ui_sid_enable);

    window = mui_make_simple_window(build_gui128(), translate_text(IDS_SID_SETTINGS));

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from128);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(ui_to_from128);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#12
0
void ui_ds12c887rtc_vic20_settings_dialog(video_canvas_t *canvas)
{
    APTR window;

    ds12c887rtc_canvas = canvas;
    intl_convert_mui_table(ui_ds12c887rtc_enable_translate, ui_ds12c887rtc_enable);

    window = mui_make_simple_window(build_gui20(), translate_text(IDS_DS12C887RTC_SETTINGS));

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from20);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(ui_to_from20);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#13
0
文件: uivideo.c 项目: AreaScout/vice
void ui_video_render_filter_settings_dialog(video_canvas_t *canvas, char *render_filter_res)
{
    APTR window;

    video_canvas = canvas;
    ui_to_from_render_filter[0].resource = render_filter_res;

    intl_convert_mui_table(ui_render_filter_translate, ui_render_filter);

    window = mui_make_simple_window(build_gui_render_filter(), translate_text(IDS_RENDER_FILTER_SETTINGS));

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from_render_filter);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(ui_to_from_render_filter);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#14
0
void ui_c64_model_custom_dialog(void)
{
    APTR window;

    intl_convert_mui_table(ui_vicii_models_translate, ui_vicii_models);
    intl_convert_mui_table(ui_new_luminances_enable_translate, ui_new_luminances_enable);
    intl_convert_mui_table(ui_cia_models_translate, ui_cia_models);
    intl_convert_mui_table(ui_glue_logic_translate, ui_glue_logic);

    window = mui_make_simple_window(build_gui(), translate_text(IDS_C64_MODEL_SETTINGS));

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(ui_to_from);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#15
0
文件: uivideo.c 项目: AreaScout/vice
void ui_video_palette_settings_dialog(video_canvas_t *canvas, char *palette_enable_res, char *palette_filename_res, char *palette_filename_text)
{
    APTR window;

    video_canvas = canvas;
    ui_to_from_palette[0].resource = palette_enable_res;
    ui_to_from_palette[1].resource = palette_filename_res;
    video_palette_filename_text = palette_filename_text;
    intl_convert_mui_table(ui_video_enable_translate, ui_video_enable);

    window = mui_make_simple_window(build_gui_palette(), translate_text(IDS_PALETTE_SETTINGS));

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from_palette);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(ui_to_from_palette);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#16
0
文件: uivideo.c 项目: AreaScout/vice
void ui_video_crt_settings_dialog(video_canvas_t *canvas, char *scanline_shade_res, char *blur_res, char *oddline_phase_res, char *oddline_offset_res)
{
    APTR window;

    video_canvas = canvas;
    ui_to_from_crt[0].resource = scanline_shade_res;
    ui_to_from_crt[1].resource = blur_res;
    ui_to_from_crt[2].resource = oddline_phase_res;
    ui_to_from_crt[3].resource = oddline_offset_res;

    window = mui_make_simple_window(build_gui_crt(), translate_text(IDS_CRT_SETTINGS));

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from_crt);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(ui_to_from_crt);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}
示例#17
0
void ui_joyport_settings_dialog(int port1, int port2, int port3, int port4, int port5)
{
    APTR window;
    int i;
    int j = 0;
    joyport_desc_t *devices_port_1;
    joyport_desc_t *devices_port_2;
    joyport_desc_t *devices_port_3;
    joyport_desc_t *devices_port_4;
    joyport_desc_t *devices_port_5;

    ports[JOYPORT_1] = port1;
    ports[JOYPORT_2] = port2;
    ports[JOYPORT_3] = port3;
    ports[JOYPORT_4] = port4;
    ports[JOYPORT_5] = port5;

    if (ports[JOYPORT_1]) {
        devices_port_1 = joyport_get_valid_devices(JOYPORT_1);
        for (i = 0; devices_port_1[i].name; ++i) {
            ui_joyport_1[i] = translate_text(devices_port_1[i].trans_name);
            ui_joyport_1_values[i] = devices_port_1[i].id;
        }
        ui_joyport_1[i] = NULL;
        ui_joyport_1_values[i] = -1;
        lib_free(devices_port_1);
        ui_to_from[j].object = NULL;
        ui_to_from[j].type = MUI_TYPE_CYCLE;
        ui_to_from[j].resource = "JoyPort1Device";
        ui_to_from[j].strings = ui_joyport_1;
        ui_to_from[j].values = ui_joyport_1_values;
        ui_to_from[j].string_choices = NULL;
        ++j;
    }

    if (ports[JOYPORT_2]) {
        devices_port_2 = joyport_get_valid_devices(JOYPORT_2);
        for (i = 0; devices_port_2[i].name; ++i) {
            ui_joyport_2[i] = translate_text(devices_port_2[i].trans_name);
            ui_joyport_2_values[i] = devices_port_2[i].id;
        }
        ui_joyport_2[i] = NULL;
        ui_joyport_2_values[i] = -1;
        lib_free(devices_port_2);
        ui_to_from[j].object = NULL;
        ui_to_from[j].type = MUI_TYPE_CYCLE;
        ui_to_from[j].resource = "JoyPort2Device";
        ui_to_from[j].strings = ui_joyport_2;
        ui_to_from[j].values = ui_joyport_2_values;
        ui_to_from[j].string_choices = NULL;
        ++j;
    }

    if (ports[JOYPORT_3]) {
        devices_port_3 = joyport_get_valid_devices(JOYPORT_3);
        for (i = 0; devices_port_3[i].name; ++i) {
            ui_joyport_3[i] = translate_text(devices_port_3[i].trans_name);
            ui_joyport_3_values[i] = devices_port_3[i].id;
        }
        ui_joyport_3[i] = NULL;
        ui_joyport_3_values[i] = -1;
        lib_free(devices_port_3);
        ui_to_from[j].object = NULL;
        ui_to_from[j].type = MUI_TYPE_CYCLE;
        ui_to_from[j].resource = "JoyPort3Device";
        ui_to_from[j].strings = ui_joyport_3;
        ui_to_from[j].values = ui_joyport_3_values;
        ui_to_from[j].string_choices = NULL;
        ++j;
    }

    if (ports[JOYPORT_4]) {
        devices_port_4 = joyport_get_valid_devices(JOYPORT_4);
        for (i = 0; devices_port_4[i].name; ++i) {
            ui_joyport_4[i] = translate_text(devices_port_4[i].trans_name);
            ui_joyport_4_values[i] = devices_port_4[i].id;
        }
        ui_joyport_4[i] = NULL;
        ui_joyport_4_values[i] = -1;
        lib_free(devices_port_4);
        ui_to_from[j].object = NULL;
        ui_to_from[j].type = MUI_TYPE_CYCLE;
        ui_to_from[j].resource = "JoyPort4Device";
        ui_to_from[j].strings = ui_joyport_4;
        ui_to_from[j].values = ui_joyport_4_values;
        ui_to_from[j].string_choices = NULL;
        ++j;
    }

    if (ports[JOYPORT_5]) {
        devices_port_5 = joyport_get_valid_devices(JOYPORT_5);
        for (i = 0; devices_port_5[i].name; ++i) {
            ui_joyport_5[i] = translate_text(devices_port_5[i].trans_name);
            ui_joyport_5_values[i] = devices_port_5[i].id;
        }
        ui_joyport_5[i] = NULL;
        ui_joyport_5_values[i] = -1;
        lib_free(devices_port_5);
        ui_to_from[j].object = NULL;
        ui_to_from[j].type = MUI_TYPE_CYCLE;
        ui_to_from[j].resource = "JoyPort5Device";
        ui_to_from[j].strings = ui_joyport_5;
        ui_to_from[j].values = ui_joyport_5_values;
        ui_to_from[j].string_choices = NULL;
        ++j;
    }

    ui_to_from[j].object = NULL;
    ui_to_from[j].type = MUI_TYPE_NONE;
    ui_to_from[j].resource = NULL;
    ui_to_from[j].strings = NULL;
    ui_to_from[j].values = NULL;
    ui_to_from[j].string_choices = NULL;

    window = mui_make_simple_window(build_gui(), translate_text(IDS_JOYPORT_SETTINGS));

    if (window != NULL) {
        mui_add_window(window);
        ui_get_to(ui_to_from);
        set(window, MUIA_Window_Open, TRUE);
        if (mui_run() == BTN_OK) {
            ui_get_from(ui_to_from);
        }
        set(window, MUIA_Window_Open, FALSE);
        mui_rem_window(window);
        MUI_DisposeObject(window);
    }
}