本文整理汇总了C++中Panel::MoveToFront方法的典型用法代码示例。如果您正苦于以下问题:C++ Panel::MoveToFront方法的具体用法?C++ Panel::MoveToFront怎么用?C++ Panel::MoveToFront使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Panel
的用法示例。
在下文中一共展示了Panel::MoveToFront方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FireGameEvent
void CClientScoreBoardDialog::FireGameEvent( IGameEvent *event )
{
const char * type = event->GetName();
if ( Q_strcmp(type, "hltv_status") == 0 )
{
// spectators = clients - proxies
m_HLTVSpectators = event->GetInt( "clients" );
m_HLTVSpectators -= event->GetInt( "proxies" );
}
else if ( Q_strcmp(type, "server_spawn") == 0 )
{
// We'll post the message ourselves instead of using SetControlString()
// so we don't try to translate the hostname.
const char *hostname = event->GetString( "hostname" );
Panel *control = FindChildByName( "ServerName" );
if ( control )
{
PostMessage( control, new KeyValues( "SetText", "text", hostname ) );
control->MoveToFront();
}
}
if( IsVisible() )
Update();
}
示例2: OnThink
void CEditorRoot::OnThink(void)
{
BaseClass::OnThink();
if ( IsBuildModeActive() )
{
Panel *pBuild = FindChildByName( "BuildModeDialog" );
if ( pBuild && !pBuild->IsCursorOver() && input()->IsKeyDown( KEY_LCONTROL ) )
pBuild->MoveToFront();
}
input()->GetCursorPosition( Mx, My );
ScreenToLocal(Mx,My);
Vector2D mCoords = GetSafeFlowgraph()->GetMousePosInNodeSpace();
m_pLabel_Coords->SetText( VarArgs( "position: %10.1f / %10.1f", mCoords.x, mCoords.y ) );
static CFastTimer _timer;
_timer.End();
double _frametime = _timer.GetDuration().GetSeconds();
_timer.Start();
m_pLabel_FrameTime->SetText( VarArgs( "fps: %4.1f, ms: %8.7f", 1.0f/max( 0.00001f, _frametime ), _frametime ) );
if ( m_bPainting )
input()->SetCursorOveride( dc_hand );
// FML
SortButtons();
//if ( m_bNeedsButtonPush )
// SortButtons();
#ifdef SHADER_EDITOR_DLL_SWARM
VPANEL modal = input()->GetAppModalSurface();
static bool bFailed = false;
if ( !bFailed && modal > 0 && modal != GetVPanel() )
{
if ( !m_bHalfView && IsVisible() && !ipanel()->HasParent( modal, GetVPanel() ) )
{
const char *pszModalName = ipanel()->GetName( modal );
const char *names[] = {
"SteamCloudConfirmation",
"AddonAssociation",
};
const int numnames = ARRAYSIZE( names );
for ( int i = 0; i < numnames; i++ )
{
if ( !Q_stricmp( names[i], pszModalName ) )
{
ToggleVisible();
return;
}
}
bFailed = true;
}
}
#endif
}
示例3: OnOpen
//=============================================================================
void CBaseModFrame::OnOpen()
{
Panel *pFooter = BaseModUI::CBaseModPanel::GetSingleton().GetFooterPanel();
if ( pFooter )
{
if ( GetLowerGarnishEnabled() )
{
pFooter->SetVisible( true );
pFooter->MoveToFront();
}
else
{
pFooter->SetVisible( false );
}
}
SetAlpha(255);//make sure we show up.
Activate();
#ifdef _X360
if(m_ActiveControl != 0)
{
m_ActiveControl->NavigateTo();
}
#endif // _X360
// close active menu if there is one
FlyoutMenu::CloseActiveMenu();
if ( ui_gameui_modal.GetBool() )
{
PushModalInputFocus();
}
}
示例4: SortButtons
void CEditorRoot::SortButtons()
{
//m_bNeedsButtonPush = false;
Panel *pViewReset = FindChildByName( "button_viewreset" );
if ( pViewReset )
{
pViewReset->MoveToFront();
pViewReset->SetBgColor( Color( 127,127,127,127) );
}
}