本文整理汇总了C++中vgui::DHANDLE::SetBounds方法的典型用法代码示例。如果您正苦于以下问题:C++ DHANDLE::SetBounds方法的具体用法?C++ DHANDLE::SetBounds怎么用?C++ DHANDLE::SetBounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vgui::DHANDLE
的用法示例。
在下文中一共展示了DHANDLE::SetBounds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PaintWindow
//-----------------------------------------------------------------------------
// main application
//-----------------------------------------------------------------------------
void CVsVGuiWindow::PaintWindow()
{
if ( m_nCurrentTick == m_nLastRenderedTick || !g_pVGui->IsRunning() )
{
ValidateRect( m_hWnd, NULL );
return;
}
m_nCurrentTick = m_nLastRenderedTick;
vgui::VPANEL root = g_pVGuiSurface->GetEmbeddedPanel();
g_pVGuiSurface->Invalidate( root );
RECT windowRect;
CMatRenderContextPtr pRenderContext( g_pMaterialSystem );
::GetClientRect( m_hWnd, &windowRect );
g_pMaterialSystem->SetView( m_hWnd );
pRenderContext->Viewport( 0, 0, windowRect.right, windowRect.bottom );
float flStartTime = Plat_FloatTime();
pRenderContext->ClearColor4ub( 76, 88, 68, 255 );
pRenderContext->ClearBuffers( true, true );
g_pMaterialSystem->BeginFrame( 0 );
// draw from the main panel down
if ( m_hMainPanel.Get() )
{
int w, h;
m_hMainPanel->GetSize( w, h );
if ( w != windowRect.right || h != windowRect.bottom )
{
m_hMainPanel->SetBounds( 0, 0, windowRect.right, windowRect.bottom );
m_hMainPanel->Repaint();
}
g_pVGuiSurface->RestrictPaintToSinglePanel( m_hMainPanel->GetVPanel() );
g_pVGuiSurface->PaintTraverseEx( root, true );
g_pVGuiSurface->RestrictPaintToSinglePanel( 0 );
}
g_pMaterialSystem->EndFrame();
g_pMaterialSystem->SwapBuffers();
g_pMaterialSystem->SetView( NULL );
ValidateRect( m_hWnd, NULL );
m_flRenderDelayTime = Plat_FloatTime() - flStartTime;
m_flRenderDelayTime = max( m_flRenderDelayTime, 0.015f );
}