本文整理汇总了C++中C_VGuiScreen::LoseFocus方法的典型用法代码示例。如果您正苦于以下问题:C++ C_VGuiScreen::LoseFocus方法的具体用法?C++ C_VGuiScreen::LoseFocus怎么用?C++ C_VGuiScreen::LoseFocus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类C_VGuiScreen
的用法示例。
在下文中一共展示了C_VGuiScreen::LoseFocus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DeactivateVguiScreen
void DeactivateVguiScreen( C_BaseEntity *pVguiScreenEnt )
{
if (pVguiScreenEnt)
{
Assert( dynamic_cast<C_VGuiScreen*>(pVguiScreenEnt) );
C_VGuiScreen *pVguiScreen = static_cast<C_VGuiScreen*>(pVguiScreenEnt);
pVguiScreen->LoseFocus( );
}
}
示例2: ActivateVguiScreen
//.........这里部分代码省略.........
#ifdef C17
}
#endif
return pBestScreen;
}
void ActivateVguiScreen( C_BaseEntity *pVguiScreenEnt )
{
if (pVguiScreenEnt)
{
Assert( dynamic_cast<C_VGuiScreen*>(pVguiScreenEnt) );
C_VGuiScreen *pVguiScreen = static_cast<C_VGuiScreen*>(pVguiScreenEnt);
pVguiScreen->GainFocus( );
}
}
void SetVGuiScreenButtonState( C_BaseEntity *pVguiScreenEnt, int nButtonState )
{
if (pVguiScreenEnt)
{
Assert( dynamic_cast<C_VGuiScreen*>(pVguiScreenEnt) );
C_VGuiScreen *pVguiScreen = static_cast<C_VGuiScreen*>(pVguiScreenEnt);
pVguiScreen->SetButtonState( nButtonState );
}
}
void DeactivateVguiScreen( C_BaseEntity *pVguiScreenEnt )
{
if (pVguiScreenEnt)
{
Assert( dynamic_cast<C_VGuiScreen*>(pVguiScreenEnt) );
C_VGuiScreen *pVguiScreen = static_cast<C_VGuiScreen*>(pVguiScreenEnt);
pVguiScreen->LoseFocus( );
}
}
CVGuiScreenPanel::CVGuiScreenPanel( vgui::Panel *parent, const char *panelName )
: BaseClass( parent, panelName )
{
m_hEntity = NULL;
}
CVGuiScreenPanel::CVGuiScreenPanel( vgui::Panel *parent, const char *panelName, vgui::HScheme hScheme )
: BaseClass( parent, panelName, hScheme )
{
m_hEntity = NULL;
}
bool CVGuiScreenPanel::Init( KeyValues* pKeyValues, VGuiScreenInitData_t* pInitData )
{
const char *pResFile = pKeyValues->GetString( "resfile" );
if (pResFile[0] != 0)
{
KeyValues *pCachedKeyValues = CacheKeyValuesForFile( pResFile );
LoadControlSettings( pResFile, NULL, pCachedKeyValues );
}
// Dimensions in pixels
int nWidth, nHeight;
nWidth = pKeyValues->GetInt( "pixelswide", 240 );
nHeight = pKeyValues->GetInt( "pixelshigh", 160 );
if ((nWidth <= 0) || (nHeight <= 0))
return false;