本文整理汇总了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();
}
示例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;
}
示例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");
}
示例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();
}
示例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();
}
示例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;
}