本文整理汇总了C++中GuiControl::setVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ GuiControl::setVisible方法的具体用法?C++ GuiControl::setVisible怎么用?C++ GuiControl::setVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GuiControl
的用法示例。
在下文中一共展示了GuiControl::setVisible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setCollapsed
void GuiPaneControl::setCollapsed(bool isCollapsed)
{
// Get the child
if(size() == 0 || !mCollapsable) return;
GuiControl *gc = dynamic_cast<GuiControl*>(operator[](0));
if(mCollapsed && !isCollapsed)
{
resize(getPosition(), mOriginalExtents);
mCollapsed = false;
if(gc)
gc->setVisible(true);
}
else if(!mCollapsed && isCollapsed)
{
mCollapsed = true;
mOriginalExtents = getExtent();
resize(getPosition(), Point2I(getExtent().x, mThumbSize.y));
if(gc)
gc->setVisible(false);
}
}
示例2: onRender
void GuiRolloutCtrl::onRender( Point2I offset, const RectI &updateRect )
{
if( !mProfile || mProfile->mFont == NULL )
return;
// Calculate actual world bounds for rendering
RectI worldBounds( offset, getExtent() );
// if opaque, fill the update rect with the fill color
if ( mProfile->mOpaque )
GFX->getDrawUtil()->drawRectFill( worldBounds, mProfile->mFillColor );
if ( mProfile->mBitmapArrayRects.size() >= NumBitmaps )
{
GFX->getDrawUtil()->clearBitmapModulation();
// Draw Rollout From Skin
if ( !mIsExpanded && !mIsAnimating )
renderFixedBitmapBordersFilled( worldBounds, 1, mProfile );
else if ( mHideHeader )
renderSizableBitmapBordersFilledIndex( worldBounds, MidPageLeft, mProfile );
else
renderSizableBitmapBordersFilledIndex( worldBounds, TopLeftHeader, mProfile );
}
if ( !(mIsExpanded && mHideHeader ) )
{
// Draw Caption ( Vertically Centered )
ColorI currColor;
GFX->getDrawUtil()->getBitmapModulation( &currColor );
Point2I textPosition = mHeader.point + offset + mProfile->mTextOffset;
GFX->getDrawUtil()->setBitmapModulation( mProfile->mFontColor );
renderJustifiedText( textPosition, mHeader.extent, mCaption );
GFX->getDrawUtil()->setBitmapModulation( currColor );
}
// If we're collapsed we contain the first child as our content
// thus we don't render it when collapsed. but to support modified
// rollouts with custom header buttons etc we still render our other
// children. -JDD
GuiControl *pChild = dynamic_cast<GuiControl*>( at(0) );
if ( pChild )
{
if ( !mIsExpanded && !mIsAnimating && pChild->isVisible() )
{
pChild->setVisible( false );
}
else if ( (mIsExpanded || mIsAnimating) && !pChild->isVisible() )
{
pChild->setVisible( true );
}
}
renderChildControls( offset, updateRect );
// Render our border should we have it specified in our profile.
renderBorder(worldBounds, mProfile);
}