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


C++ MenuItem::SetHiddenText方法代码示例

本文整理汇总了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;
}
开发者ID:imyzcn,项目名称:mani-admin-plugin,代码行数:50,代码来源:mani_observer_track.cpp

示例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;
}
开发者ID:imyzcn,项目名称:mani-admin-plugin,代码行数:28,代码来源:mani_skins.cpp

示例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;

}
开发者ID:gunslinger23,项目名称:maniadminplugin,代码行数:32,代码来源:mani_weapon.cpp


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