瀏覽代碼

fix a couple cases of old direct references
use getBitmap(), not mBitmap

AzaezelX 4 月之前
父節點
當前提交
38de3d866c
共有 2 個文件被更改,包括 6 次插入6 次删除
  1. 3 3
      Engine/source/gui/controls/guiAnimBitmapCtrl.cpp
  2. 3 3
      Engine/source/gui/controls/guiBitmapBarCtrl.cpp

+ 3 - 3
Engine/source/gui/controls/guiAnimBitmapCtrl.cpp

@@ -219,7 +219,7 @@ bool guiAnimBitmapCtrl::ptSetFrameRanges(void *object, const char *index, const
 
 
 void guiAnimBitmapCtrl::onRender(Point2I offset, const RectI &updateRect)
 void guiAnimBitmapCtrl::onRender(Point2I offset, const RectI &updateRect)
 {
 {
-   if (mBitmap)
+   if (getBitmap())
    {
    {
       if (mFrameTime->getElapsedMs() > 1000 / mFramesPerSec) //fps to msfp conversion
       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()->clearBitmapModulation();
       GFX->getDrawUtil()->setBitmapModulation(mColor);
       GFX->getDrawUtil()->setBitmapModulation(mColor);
 
 
-      GFXTextureObject* texture = mBitmap;
+      GFXTextureObject* texture = getBitmap();
 
 
       Point2I modifiedSRC = Point2I(texture->mBitmapSize.x / mAnimTexTiling.x, texture->mBitmapSize.y / mAnimTexTiling.y);
       Point2I modifiedSRC = Point2I(texture->mBitmapSize.x / mAnimTexTiling.x, texture->mBitmapSize.y / mAnimTexTiling.y);
       RectI srcRegion;
       RectI srcRegion;
@@ -292,7 +292,7 @@ void guiAnimBitmapCtrl::onRender(Point2I offset, const RectI &updateRect)
       GFX->getDrawUtil()->drawBitmapStretchSR(texture, updateRect, srcRegion, GFXBitmapFlip_None, GFXTextureFilterLinear, false);
       GFX->getDrawUtil()->drawBitmapStretchSR(texture, updateRect, srcRegion, GFXBitmapFlip_None, GFXTextureFilterLinear, false);
    }
    }
 
 
-   if (mProfile->mBorder || !mBitmap)
+   if (mProfile->mBorder || !getBitmap())
    {
    {
       RectI rect(offset, getExtent());
       RectI rect(offset, getExtent());
       GFX->getDrawUtil()->drawRect(rect, mProfile->mBorderColor);
       GFX->getDrawUtil()->drawRect(rect, mProfile->mBorderColor);

+ 3 - 3
Engine/source/gui/controls/guiBitmapBarCtrl.cpp

@@ -56,12 +56,12 @@ void GuiBitmapBarCtrl::initPersistFields()
 
 
 void GuiBitmapBarCtrl::onRender(Point2I offset, const RectI &updateRect)
 void GuiBitmapBarCtrl::onRender(Point2I offset, const RectI &updateRect)
 {
 {
-   if (mBitmap)
+   if (getBitmap())
    {
    {
       GFX->getDrawUtil()->clearBitmapModulation();
       GFX->getDrawUtil()->clearBitmapModulation();
       GFX->getDrawUtil()->setBitmapModulation(mColor);
       GFX->getDrawUtil()->setBitmapModulation(mColor);
       F32 pct = (mPercent / 100.0);
       F32 pct = (mPercent / 100.0);
-      GFXTextureObject* texture = mBitmap;
+      GFXTextureObject* texture = getBitmap();
       Point2I modifiedSRC;
       Point2I modifiedSRC;
       modifiedSRC.x = mVertical ? (F32)texture->mBitmapSize.x : (F32)(texture->mBitmapSize.x*pct);
       modifiedSRC.x = mVertical ? (F32)texture->mBitmapSize.x : (F32)(texture->mBitmapSize.x*pct);
       modifiedSRC.y = mVertical ? (F32)(texture->mBitmapSize.y*pct) : (F32)texture->mBitmapSize.y;
       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);
       GFX->getDrawUtil()->drawBitmapStretchSR(texture, destRegion, srcRegion, GFXBitmapFlip_None, GFXTextureFilterLinear, false);
    }
    }
 
 
-   if (mProfile->mBorder || !mBitmap)
+   if (mProfile->mBorder || !getBitmap())
    {
    {
       RectI rect(offset, getExtent());
       RectI rect(offset, getExtent());
       GFX->getDrawUtil()->drawRect(rect, mProfile->mBorderColor);
       GFX->getDrawUtil()->drawRect(rect, mProfile->mBorderColor);