mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-10 22:24:33 +00:00
check wether or not mBitmapArrayRects.empty(). not simply if size()
(cherry picked from commit fea81a4d57edff9c05bf397a5b21d8422838cc1c)
This commit is contained in:
parent
f1d42d3867
commit
d6480cb63c
7 changed files with 26 additions and 26 deletions
|
|
@ -82,7 +82,7 @@ bool GuiCheckBoxCtrl::onWake()
|
|||
|
||||
// make sure there is a bitmap array for this control type
|
||||
// if it is declared as such in the control
|
||||
if( !mProfile->mBitmapArrayRects.size() && !mProfile->constructBitmapArray() )
|
||||
if(mProfile->mBitmapArrayRects.empty() && !mProfile->constructBitmapArray() )
|
||||
{
|
||||
Con::errorf( "GuiCheckBoxCtrl::onWake - failed to create bitmap array from profile '%s'", mProfile->getName() );
|
||||
return false;
|
||||
|
|
@ -159,9 +159,9 @@ void GuiCheckBoxCtrl::autoSize()
|
|||
{
|
||||
mProfile->incLoadCount();
|
||||
|
||||
if( !mProfile->mBitmapArrayRects.size() )
|
||||
if(mProfile->mBitmapArrayRects.empty())
|
||||
mProfile->constructBitmapArray();
|
||||
if( mProfile->mBitmapArrayRects.size() )
|
||||
if(!mProfile->mBitmapArrayRects.empty())
|
||||
bmpArrayRect0Width = mProfile->mBitmapArrayRects[ 0 ].extent.x;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect )
|
|||
{
|
||||
// If there is a bitmap array then render using it.
|
||||
// Otherwise use a standard fill.
|
||||
if(mProfile->mUseBitmapArray && mProfile->mBitmapArrayRects.size())
|
||||
if(mProfile->mUseBitmapArray && !mProfile->mBitmapArrayRects.empty())
|
||||
renderBitmapArray(boundsRect, statePressed);
|
||||
else
|
||||
renderSlightlyLoweredBox(boundsRect, mProfile);
|
||||
|
|
@ -241,7 +241,7 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect )
|
|||
{
|
||||
// If there is a bitmap array then render using it.
|
||||
// Otherwise use a standard fill.
|
||||
if (mProfile->mUseBitmapArray && mProfile->mBitmapArrayRects.size())
|
||||
if (mProfile->mUseBitmapArray && !mProfile->mBitmapArrayRects.empty())
|
||||
{
|
||||
renderBitmapArray(boundsRect, stateMouseOver);
|
||||
}
|
||||
|
|
@ -257,7 +257,7 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect )
|
|||
{
|
||||
// If there is a bitmap array then render using it.
|
||||
// Otherwise use a standard fill.
|
||||
if(mProfile->mUseBitmapArray && mProfile->mBitmapArrayRects.size())
|
||||
if(mProfile->mUseBitmapArray && !mProfile->mBitmapArrayRects.empty())
|
||||
{
|
||||
if(mActive)
|
||||
renderBitmapArray(boundsRect, stateNormal);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue