mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
fix a couple cases of old direct references
use getBitmap(), not mBitmap
This commit is contained in:
parent
e557f5962b
commit
38de3d866c
2 changed files with 6 additions and 6 deletions
|
|
@ -56,12 +56,12 @@ void GuiBitmapBarCtrl::initPersistFields()
|
|||
|
||||
void GuiBitmapBarCtrl::onRender(Point2I offset, const RectI &updateRect)
|
||||
{
|
||||
if (mBitmap)
|
||||
if (getBitmap())
|
||||
{
|
||||
GFX->getDrawUtil()->clearBitmapModulation();
|
||||
GFX->getDrawUtil()->setBitmapModulation(mColor);
|
||||
F32 pct = (mPercent / 100.0);
|
||||
GFXTextureObject* texture = mBitmap;
|
||||
GFXTextureObject* texture = getBitmap();
|
||||
Point2I modifiedSRC;
|
||||
modifiedSRC.x = mVertical ? (F32)texture->mBitmapSize.x : (F32)(texture->mBitmapSize.x*pct);
|
||||
modifiedSRC.y = mVertical ? (F32)(texture->mBitmapSize.y*pct) : (F32)texture->mBitmapSize.y;
|
||||
|
|
@ -92,7 +92,7 @@ void GuiBitmapBarCtrl::onRender(Point2I offset, const RectI &updateRect)
|
|||
GFX->getDrawUtil()->drawBitmapStretchSR(texture, destRegion, srcRegion, GFXBitmapFlip_None, GFXTextureFilterLinear, false);
|
||||
}
|
||||
|
||||
if (mProfile->mBorder || !mBitmap)
|
||||
if (mProfile->mBorder || !getBitmap())
|
||||
{
|
||||
RectI rect(offset, getExtent());
|
||||
GFX->getDrawUtil()->drawRect(rect, mProfile->mBorderColor);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue