本文整理汇总了C++中C_VGuiScreen::GainFocus方法的典型用法代码示例。如果您正苦于以下问题:C++ C_VGuiScreen::GainFocus方法的具体用法?C++ C_VGuiScreen::GainFocus怎么用?C++ C_VGuiScreen::GainFocus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类C_VGuiScreen
的用法示例。
在下文中一共展示了C_VGuiScreen::GainFocus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ActivateVguiScreen
void ActivateVguiScreen( C_BaseEntity *pVguiScreenEnt )
{
if (pVguiScreenEnt)
{
Assert( dynamic_cast<C_VGuiScreen*>(pVguiScreenEnt) );
C_VGuiScreen *pVguiScreen = static_cast<C_VGuiScreen*>(pVguiScreenEnt);
pVguiScreen->GainFocus( );
}
}
示例2: ActivateVguiScreen
//.........这里部分代码省略.........
float flPerpDist = DotProduct(vecViewDelta, vecOut);
if ((flPerpDist < 0) || (flPerpDist > VGUI_SCREEN_MODE_RADIUS))
continue;
// Perform a raycast to see where in barycentric coordinates the ray hits
// the viewscreen; if it doesn't hit it, you're not in the mode
float u, v, t;
if (!pScreen->IntersectWithRay(lookRay, &u, &v, &t))
continue;
// Barycentric test
if ((u < 0) || (v < 0) || (u > 1) || (v > 1))
continue;
if (t < flBestDist)
{
flBestDist = t;
pBestScreen = pScreen;
}
}
#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 )
{