mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge pull request #1478 from Azaezel/alpha41/bitmapBonk
fix a couple cases of old direct references
This commit is contained in:
commit
95fb6a3768
|
|
@ -219,7 +219,7 @@ bool guiAnimBitmapCtrl::ptSetFrameRanges(void *object, const char *index, const
|
|||
|
||||
void guiAnimBitmapCtrl::onRender(Point2I offset, const RectI &updateRect)
|
||||
{
|
||||
if (mBitmap)
|
||||
if (getBitmap())
|
||||
{
|
||||
if (mFrameTime->getElapsedMs() > 1000 / mFramesPerSec) //fps to msfp conversion
|
||||
{
|
||||
|
|
@ -278,7 +278,7 @@ void guiAnimBitmapCtrl::onRender(Point2I offset, const RectI &updateRect)
|
|||
GFX->getDrawUtil()->clearBitmapModulation();
|
||||
GFX->getDrawUtil()->setBitmapModulation(mColor);
|
||||
|
||||
GFXTextureObject* texture = mBitmap;
|
||||
GFXTextureObject* texture = getBitmap();
|
||||
|
||||
Point2I modifiedSRC = Point2I(texture->mBitmapSize.x / mAnimTexTiling.x, texture->mBitmapSize.y / mAnimTexTiling.y);
|
||||
RectI srcRegion;
|
||||
|
|
@ -292,7 +292,7 @@ void guiAnimBitmapCtrl::onRender(Point2I offset, const RectI &updateRect)
|
|||
GFX->getDrawUtil()->drawBitmapStretchSR(texture, updateRect, srcRegion, GFXBitmapFlip_None, GFXTextureFilterLinear, false);
|
||||
}
|
||||
|
||||
if (mProfile->mBorder || !mBitmap)
|
||||
if (mProfile->mBorder || !getBitmap())
|
||||
{
|
||||
RectI rect(offset, getExtent());
|
||||
GFX->getDrawUtil()->drawRect(rect, mProfile->mBorderColor);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -115,14 +115,14 @@ public:
|
|||
}
|
||||
|
||||
ColorI color(255,255,255,alpha);
|
||||
if (mBitmap)
|
||||
if (getBitmap())
|
||||
{
|
||||
GFX->getDrawUtil()->setBitmapModulation(color);
|
||||
|
||||
if(mWrap)
|
||||
{
|
||||
|
||||
GFXTextureObject* texture = mBitmap;
|
||||
GFXTextureObject* texture = getBitmap();
|
||||
RectI srcRegion;
|
||||
RectI dstRegion;
|
||||
F32 xdone = ((F32)getExtent().x/(F32)texture->mBitmapSize.x)+1;
|
||||
|
|
@ -145,11 +145,11 @@ public:
|
|||
else
|
||||
{
|
||||
RectI rect(offset, getExtent());
|
||||
GFX->getDrawUtil()->drawBitmapStretch(mBitmap, rect);
|
||||
GFX->getDrawUtil()->drawBitmapStretch(getBitmap(), rect);
|
||||
}
|
||||
}
|
||||
|
||||
if (mProfile->mBorder || !mBitmap)
|
||||
if (mProfile->mBorder || !getBitmap())
|
||||
{
|
||||
RectI rect(offset.x, offset.y, getExtent().x, getExtent().y);
|
||||
ColorI borderCol(mProfile->mBorderColor);
|
||||
|
|
|
|||
Loading…
Reference in a new issue