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


C++ Dialog::AddItem方法代码示例

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


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

示例1: EnterReplayMenu

static void EnterReplayMenu(ODItem *item, int dir)
{
Dialog *dlg = opt.dlg;
ReplaySlotInfo slot;
bool have_replays = false;

	dlg->Clear();
	sound(SND_MENU_MOVE);
	
	for(int i=0;i<MAX_REPLAYS;i++)
	{
		Replay::GetSlotInfo(i, &slot);
		
		if (slot.status != RS_UNUSED)
		{
			const char *mapname = map_get_stage_name(slot.hdr.stageno);
			dlg->AddItem(mapname, EnterReplaySubmenu, _upd_replay, i);
			have_replays = true;
		}
	}
	
	if (!have_replays)
		dlg->AddDismissalItem("[no replays yet]");
	
	dlg->AddSeparator();
	dlg->AddDismissalItem();
}
开发者ID:histat,项目名称:dc-nx,代码行数:27,代码来源:options.cpp

示例2: EnterMainMenu

static void EnterMainMenu()
{
Dialog *dlg = opt.dlg;

	dlg->Clear();
	
	dlg->AddItem("Resolution: ", _res_change, _res_get);
	dlg->AddItem("Controls", EnterControlsMenu);
#ifndef __SDLSHIM__
	dlg->AddItem("Replay", EnterReplayMenu);
#endif
	
	dlg->AddSeparator();
	
	dlg->AddItem("Enable Debug Keys", _debug_change, _debug_get);
	dlg->AddItem("Save Slots: ", _save_change, _save_get);
	
	dlg->AddSeparator();
	
	dlg->AddItem("Music: ", _music_change, _music_get);
	dlg->AddItem("Sound: ", _sound_change, _sound_get);
	
	dlg->AddSeparator();
	dlg->AddDismissalItem();
	
	dlg->SetSelection(opt.mm_cursel);
	dlg->onclear = LeavingMainMenu;
	opt.InMainMenu = true;
}
开发者ID:histat,项目名称:dc-nx,代码行数:29,代码来源:options.cpp

示例3: _setup_vjoy_controls_menu

static void _setup_vjoy_controls_menu()
{
    Dialog *dlg = opt.dlg;
    
    dlg->Clear();
	sound(SND_MENU_MOVE);
	
	dlg->AddItem("View preset", _edit_view_preset, _get_view_preset);
    
    
	dlg->AddSeparator();
    
    dlg->AddItem("Edit buttons", _enter_edit_buttons);
    
	dlg->AddSeparator();
    
    dlg->AddItem("Keys show mode", _edit_show_mode, _get_show_mode);
    
    dlg->AddSeparator();
    
    dlg->AddItem("Apply", _apply_preset);
	dlg->AddDismissalItem("Cancel");
}
开发者ID:Kfeavel,项目名称:NXEngine-iOS9,代码行数:23,代码来源:options.cpp

示例4: EnterTapControlsMenu

static void EnterTapControlsMenu(ODItem *item, int dir)
{
    Dialog *dlg = opt.dlg;
    
	dlg->Clear();
	sound(SND_MENU_MOVE);
	
	dlg->AddItem("Tap controls", _edit_tap_control, _get_tap_control, Settings::Tap::EAll);
    
	dlg->AddSeparator();
    
	dlg->AddItem("Movies",      _edit_tap_control, _get_tap_control, Settings::Tap::EMovies);
	dlg->AddItem("Title",       _edit_tap_control, _get_tap_control, Settings::Tap::ETitle);
	dlg->AddItem("Save/load",   _edit_tap_control, _get_tap_control, Settings::Tap::ESaveLoad);
	dlg->AddItem("Dialogs",     _edit_tap_control, _get_tap_control, Settings::Tap::EIngameDialog);
	dlg->AddItem("Inventory",   _edit_tap_control, _get_tap_control, Settings::Tap::EInventory);
	dlg->AddItem("Pause",       _edit_tap_control, _get_tap_control, Settings::Tap::EPause);
	dlg->AddItem("Options",     _edit_tap_control, _get_tap_control, Settings::Tap::EOptions);
	dlg->AddItem("MapSystem",   _edit_tap_control, _get_tap_control, Settings::Tap::EMapSystem);
    
	dlg->AddSeparator();
	dlg->AddDismissalItem();
}
开发者ID:Kfeavel,项目名称:NXEngine-iOS9,代码行数:23,代码来源:options.cpp

示例5: EnterControlsMenu

static void EnterControlsMenu(ODItem *item, int dir)
{
Dialog *dlg = opt.dlg;

	dlg->Clear();
	sound(SND_MENU_MOVE);
	
	dlg->AddItem("Left", _edit_control, _upd_control, LEFTKEY);
	dlg->AddItem("Right", _edit_control, _upd_control, RIGHTKEY);
	dlg->AddItem("Up", _edit_control, _upd_control, UPKEY);
	dlg->AddItem("Down", _edit_control, _upd_control, DOWNKEY);
	
	dlg->AddSeparator();
	
	dlg->AddItem("Jump", _edit_control, _upd_control, JUMPKEY);
	dlg->AddItem("Fire", _edit_control, _upd_control,  FIREKEY);
	dlg->AddItem("Wpn Prev", _edit_control, _upd_control, PREVWPNKEY);
	dlg->AddItem("Wpn Next", _edit_control, _upd_control, NEXTWPNKEY);
	dlg->AddItem("Inventory", _edit_control, _upd_control, INVENTORYKEY);
	dlg->AddItem("Map", _edit_control, _upd_control, MAPSYSTEMKEY);
	
	dlg->AddSeparator();
	dlg->AddDismissalItem();
}
开发者ID:histat,项目名称:dc-nx,代码行数:24,代码来源:options.cpp

示例6: EnterMainMenu

static void EnterMainMenu()
{
Dialog *dlg = opt.dlg;

	dlg->Clear();
	
#if !defined(IPHONE)
	dlg->AddItem("Resolution: ", _res_change, _res_get);
	dlg->AddItem("Controls", EnterControlsMenu);
#endif
    
#ifdef CONFIG_USE_TAPS
    dlg->AddItem("Tap controls", EnterTapControlsMenu);
#endif
    
#ifdef CONFIG_USE_VJOY
    dlg->AddItem("Virtual keys", EnterVjoyControlsMenu);
#endif
    
	dlg->AddItem("Replay", EnterReplayMenu);
	
	dlg->AddSeparator();
	
	dlg->AddItem("Enable Debug Keys", _debug_change, _debug_get);
	dlg->AddItem("Save Slots: ", _save_change, _save_get);
	
	dlg->AddSeparator();
	
	dlg->AddItem("Music: ", _music_change, _music_get);
	dlg->AddItem("Sound: ", _sound_change, _sound_get);
	
	dlg->AddSeparator();
	dlg->AddDismissalItem();
	
	dlg->SetSelection(opt.mm_cursel);
	dlg->onclear = LeavingMainMenu;
	opt.InMainMenu = true;
}
开发者ID:Kfeavel,项目名称:NXEngine-iOS9,代码行数:38,代码来源:options.cpp


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