本文整理汇总了C++中FlyoutMenu::GetOriginalTall方法的典型用法代码示例。如果您正苦于以下问题:C++ FlyoutMenu::GetOriginalTall方法的具体用法?C++ FlyoutMenu::GetOriginalTall怎么用?C++ FlyoutMenu::GetOriginalTall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FlyoutMenu
的用法示例。
在下文中一共展示了FlyoutMenu::GetOriginalTall方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PaintButtonEx
//.........这里部分代码省略.........
if ( bDrawCursor )
{
// draw backing rectangle
if ( curState == Open )
{
surface()->DrawSetColor( Color( 0, 0, 0, 255 ) );
surface()->DrawFilledRectFade( x, y, x+wide, y+tall, 0, 255, true );
}
// draw blotch
surface()->DrawSetColor( blotchColor );
if ( m_nStyle == BUTTON_DIALOG )
{
int blotchWide = textWide;
int blotchX = x + textInsetX;
surface()->DrawFilledRectFade( blotchX, y, blotchX + 0.50f * blotchWide, y+tall, 0, 150, true );
surface()->DrawFilledRectFade( blotchX + 0.50f * blotchWide, y, blotchX + blotchWide, y+tall, 150, 0, true );
}
else
{
int blotchWide = textWide + vgui::scheme()->GetProportionalScaledValueEx( GetScheme(), 40 );
int blotchX = x + textInsetX;
surface()->DrawFilledRectFade( blotchX, y, blotchX + 0.25f * blotchWide, y+tall, 0, 150, true );
surface()->DrawFilledRectFade( blotchX + 0.25f * blotchWide, y, blotchX + blotchWide, y+tall, 150, 0, true );
}
// draw border lines
surface()->DrawSetColor( borderColor );
if ( curState == Open )
{
FlyoutMenu *pActiveFlyout = FlyoutMenu::GetActiveMenu();
BaseModHybridButton *button = dynamic_cast< BaseModHybridButton* >( pActiveFlyout ? pActiveFlyout->GetNavFrom() : NULL );
if ( pActiveFlyout && pActiveFlyout->GetOriginalTall() == 0 && button && button == this )
{
surface()->DrawFilledRectFade( x, y, x + wide, y+2, 255, 0, true );
}
else
{
// the border lines end at the beginning of the flyout
// the flyout will draw to complete the look
surface()->DrawFilledRectFade( x, y, x + wide, y+2, 0, 255, true );
surface()->DrawFilledRectFade( x, y+tall-2, x + wide, y+tall, 0, 255, true );
}
}
else
{
// top and bottom border lines
surface()->DrawFilledRectFade( x, y, x + 0.5f * wide, y+2, 0, 255, true );
surface()->DrawFilledRectFade( x + 0.5f * wide, y, x + wide, y+2, 255, 0, true );
surface()->DrawFilledRectFade( x, y+tall-2, x + 0.5f * wide, y+tall, 0, 255, true );
surface()->DrawFilledRectFade( x + 0.5f * wide, y+tall-2, x + wide, y+tall, 255, 0, true );
}
}
// assume drawn, unless otherwise shortened with ellipsis
int iLabelCharsDrawn = len;
// draw the text
if ( bDrawText )
{
int availableWidth = GetWide() - x - textInsetX;
if ( m_bShowDropDownIndicator )
{
int textTall = vgui::surface()->GetFontTall( m_hTextFont );