当前位置: 首页>>代码示例>>C++>>正文


C++ FileSpecifier::ReadDialog方法代码示例

本文整理汇总了C++中FileSpecifier::ReadDialog方法的典型用法代码示例。如果您正苦于以下问题:C++ FileSpecifier::ReadDialog方法的具体用法?C++ FileSpecifier::ReadDialog怎么用?C++ FileSpecifier::ReadDialog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileSpecifier的用法示例。


在下文中一共展示了FileSpecifier::ReadDialog方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: find_replay_to_use

bool find_replay_to_use(bool ask_user, FileSpecifier &file)
{
	if (ask_user) {
		return file.ReadDialog(_typecode_film);
	} else
		return get_recording_filedesc(file);
}
开发者ID:MaddTheSane,项目名称:alephone,代码行数:7,代码来源:vbl.cpp

示例2: choose_saved_game_to_load

/* Note this should show the map of where you are... */
bool choose_saved_game_to_load(FileSpecifier& File)
// FSSpec *saved_game)
{
    return File.ReadDialog(_typecode_savegame);
    /*
    SFTypeList type_list;
    short type_count= 0;
    StandardFileReply reply;

    type_list[type_count++]= SAVE_GAME_TYPE;

    StandardGetFile(NULL, type_count, type_list, &reply);

    if(reply.sfGood)
    {
    	BlockMove(&reply.sfFile, saved_game, sizeof(FSSpec));
    }

    return reply.sfGood;
    */
}
开发者ID:Aleph-One-Marathon,项目名称:alephone-dingoo,代码行数:22,代码来源:preprocess_map_mac.cpp

示例3: load_quick_save_dialog

bool load_quick_save_dialog(FileSpecifier& saved_game)
{
    QuickSaves::instance()->enumerate();

    dialog d;
    vertical_placer *placer = new vertical_placer;
    w_title *w_header = new w_title("CONTINUE SAVED GAME");
    placer->dual_add(w_header, d);
    placer->add(new w_spacer, true);
    
    horizontal_placer *mini_button_placer = new horizontal_placer;
    w_tiny_button *rename_w = new w_tiny_button("RENAME", dialog_rename, &d);
    rename_w->set_identifier(iDIALOG_RENAME_W);
    mini_button_placer->dual_add(rename_w, d);
#ifndef MAC_APP_STORE
    w_tiny_button *export_w = new w_tiny_button("EXPORT", dialog_export, &d);
    export_w->set_identifier(iDIALOG_EXPORT_W);
    mini_button_placer->dual_add(export_w, d);
#endif
    w_tiny_button *delete_w = new w_tiny_button("DELETE", dialog_delete, &d);
    delete_w->set_identifier(iDIALOG_DELETE_W);
    mini_button_placer->dual_add(delete_w, d);
    
    placer->add(mini_button_placer, true);
    placer->add(new w_spacer, true);

    std::vector<QuickSave> saves(QuickSaves::instance()->begin(), QuickSaves::instance()->end());
    w_saves* saves_w = new w_saves(saves, 400, 4);
    saves_w->set_identifier(iDIALOG_SAVES_W);
    placer->dual_add(saves_w, d);
    placer->add(new w_spacer, true);

    horizontal_placer* button_placer = new horizontal_placer;
#ifndef MAC_APP_STORE
    w_button* other_w = new w_button("LOAD OTHER", dialog_exit_other, &d);
    button_placer->dual_add(other_w, d);
#endif
    w_button* accept_w = new w_button("LOAD", dialog_ok, &d);
    accept_w->set_identifier(iDIALOG_ACCEPT_W);
    button_placer->dual_add(accept_w, d);
    w_button* cancel_w = new w_button("CANCEL", dialog_cancel, &d);
    button_placer->dual_add(cancel_w, d);
    
    placer->add(button_placer, true);
    
    d.set_widget_placer(placer);
    d.activate_widget(saves_w);
    
    if (!saves_w->has_selection())
    {
        rename_w->set_enabled(false);
        delete_w->set_enabled(false);
#ifndef MAC_APP_STORE
        export_w->set_enabled(false);
#endif
        accept_w->set_enabled(false);
    }
    
    bool ret = false;
    QuickSave sel;
    switch (d.run()) {
        case 0:
            sel = saves_w->selected_save();
            saved_game = sel.save_file;
            last_saved_game = saved_game;
            last_saved_networked = (sel.players > 1) ? 1 : 0;
            ret = true;
            break;
        case LOAD_DIALOG_OTHER:
            last_saved_networked = UNONE;
            ret = saved_game.ReadDialog(_typecode_savegame);
            break;
        default:
            break;
    }
    
    QuickSaves::instance()->clear();
    QuickSaveImageCache::instance()->clear();
    return ret;
}
开发者ID:pfhore-github,项目名称:alephone_jp,代码行数:80,代码来源:QuickSave.cpp


注:本文中的FileSpecifier::ReadDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。