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


C++ BaseModHybridButton::SetEnabled方法代码示例

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


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

示例1: ApplySchemeSettings

//=============================================================================
void InGameMainMenu::ApplySchemeSettings( vgui::IScheme *pScheme )
{
	BaseClass::ApplySchemeSettings( pScheme );

	// We cant remove button and resize flyout menu from code, but we can use another .res file for base menu.
#ifdef UI_USING_GAMEPLAYCONFIGDIALOG
	if ( demo_ui_enable.GetString()[0] )
	{
		LoadControlSettings( CFmtStr( "Resource/UI/BaseModUI/InGameMainMenu_%s.res", demo_ui_enable.GetString() ) );
	}
	else
	{
		LoadControlSettings( "Resource/UI/BaseModUI/InGameMainMenu.res" );
	}
#else
	// all that "demoui" stuff confuse me [str]
	const char *pSettings = "Resource/UI/BaseModUI/InGameMainMenu_NoGameplay.res";
#endif

	BaseModHybridButton *button = dynamic_cast< BaseModHybridButton* >( FindChildByName( "BtnDeveloperCommentaries" ) );
	if ( button )
	{
#ifdef UI_USING_DEVCOMMENTARIES
		button->SetEnabled( true ); // we're not just removing button, because of ASWUI flyout system [str]
									// thought: maybe just use different control setting
#endif
	}

	SetPaintBackgroundEnabled( true );

	SetFooterState();
}
开发者ID:Muini,项目名称:Nag-asw,代码行数:33,代码来源:vingamemainmenu.cpp

示例2: LoadLayout

//=============================================================================
void InGameDifficultySelect::LoadLayout()
{
	BaseClass::LoadLayout();

	CGameUIConVarRef z_difficulty("z_difficulty");

	if ( z_difficulty.IsValid() )
	{
		// set a label that tells us what the current difficulty is
		char chBuffer[64];
		Q_snprintf( chBuffer, ARRAYSIZE( chBuffer ), "#L4D360UI_Difficulty_%s", z_difficulty.GetString() );

		const char *pszDifficultyLoc = chBuffer;
		wchar_t *pwcDifficulty = g_pVGuiLocalize->Find( pszDifficultyLoc );
		if ( pwcDifficulty )
		{
			wchar_t szWideBuff[200];		
			g_pVGuiLocalize->ConstructString( szWideBuff, sizeof( szWideBuff ), g_pVGuiLocalize->Find( "#L4D360UI_GameSettings_Current_Difficulty" ), 1, pwcDifficulty );

			SetControlString( "LblCurrentDifficulty", szWideBuff );
		}
	
		// Disable the current difficulty's button, and navigate to it.
		BaseModHybridButton *pButton = dynamic_cast< BaseModHybridButton* >( FindChildByName( VarArgs( "Btn%s", z_difficulty.GetString() ) ) );
		if ( pButton )
		{
			pButton->SetEnabled( false );
			pButton->NavigateTo();
		}
	}
}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:32,代码来源:vingamedifficultyselect.cpp

示例3: Demo_DisableButton

void Demo_DisableButton( Button *pButton )
{
	BaseModHybridButton *pHybridButton = dynamic_cast<BaseModHybridButton *>(pButton);

	if (pHybridButton)
	{
		pHybridButton->SetEnabled( false );

		char szTooltip[512];
		wchar_t *wUnicode = g_pVGuiLocalize->Find( "#L4D360UI_MainMenu_DemoVersion" );
		if ( !wUnicode )
			wUnicode = L"";

		g_pVGuiLocalize->ConvertUnicodeToANSI( wUnicode, szTooltip, sizeof( szTooltip ) );

		pHybridButton->SetHelpText( szTooltip , false );
	}
}
开发者ID:gamenew09,项目名称:SourceSDK2010,代码行数:18,代码来源:vhybridbutton.cpp


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