本文整理汇总了C++中MenuItem::SetHiddenText方法的典型用法代码示例。如果您正苦于以下问题:C++ MenuItem::SetHiddenText方法的具体用法?C++ MenuItem::SetHiddenText怎么用?C++ MenuItem::SetHiddenText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MenuItem
的用法示例。
在下文中一共展示了MenuItem::SetHiddenText方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PopulateMenuPage
bool ObservePlayerPage::PopulateMenuPage(player_t *player_ptr)
{
this->SetEscLink("%s", Translate(player_ptr, 3110));
this->SetTitle("%s", Translate(player_ptr, 3111));
MenuItem *ptr = NULL;
if (gpManiObserverTrack->observer_id[player_ptr->index - 1] != -1)
{
ptr = new ObservePlayerItem;
ptr->SetDisplayText("%s", Translate(player_ptr, 3114));
ptr->params.AddParamVar("user_id", "%i", -1);
ptr->SetHiddenText(" ");
this->AddItem(ptr);
}
for( int i = 1; i <= max_players; i++ )
{
player_t player;
player.index = i;
if (!FindPlayerByIndex(&player)) continue;
if (player.player_info->IsFakeClient())
{
continue;
}
ptr = new ObservePlayerItem;
if (gpManiObserverTrack->observer_id[player_ptr->index - 1] == player.index)
{
ptr->SetDisplayText("%s [%s] %i",
Translate(player_ptr, 3112),
player.name,
player.user_id);
}
else
{
ptr->SetDisplayText("[%s] %i",
player.name,
player.user_id);
}
ptr->SetHiddenText("%s", player.name);
ptr->params.AddParamVar("user_id", "%i", player.user_id);
this->AddItem(ptr);
}
this->SortHidden();
return true;
}
示例2: PopulateMenuPage
bool SetSkinPage::PopulateMenuPage(player_t *player_ptr)
{
this->SetEscLink("%s", Translate(player_ptr, 780));
this->SetTitle("%s", Translate(player_ptr, 781));
for( int i = 1; i <= max_players; i++ )
{
player_t player;
player.index = i;
if (!FindPlayerByIndex(&player)) continue;
if (player.is_dead) continue;
if (player_ptr->index != player.index &&
gpManiClient->HasAccess(player.index, IMMUNITY, IMMUNITY_SETSKIN))
{
continue;
}
MenuItem *ptr = new SetSkinItem();
ptr->SetDisplayText("[%s] %i", player.name, player.user_id);
ptr->SetHiddenText("%s", player.name);
ptr->params.AddParam("user_id", player.user_id);
this->AddItem(ptr);
}
this->SortHidden();
return true;
}
示例3: PopulateMenuPage
bool RestrictWeaponPage::PopulateMenuPage(player_t *player_ptr)
{
this->SetEscLink("%s", Translate(player_ptr, 530));
this->SetTitle("%s", Translate(player_ptr, 531));
// Setup weapon list
for( int i = 0; i < MAX_WEAPONS_USED; i++ )
{
if ( !gpManiWeaponMgr->weapons[i] ) continue;
if (gpManiWeaponMgr->weapons[i]->GetDisplayID() == 0) continue;
MenuItem *ptr = new RestrictWeaponItem();
if (!gpManiWeaponMgr->weapons[i]->IsRestricted())
{
ptr->SetDisplayText("%s", Translate(player_ptr, gpManiWeaponMgr->weapons[i]->GetDisplayID()));
}
else
{
ptr->SetDisplayText("* %s <%i>",
Translate(player_ptr, gpManiWeaponMgr->weapons[i]->GetDisplayID()),
gpManiWeaponMgr->weapons[i]->GetTeamLimit());
}
ptr->SetHiddenText("%s", Translate(player_ptr, gpManiWeaponMgr->weapons[i]->GetDisplayID()));
ptr->params.AddParam("index", i);
this->AddItem(ptr);
}
this->SortHidden();
return true;
}