Kaynağa Gözat

Properly update GUI button states when one of the states has no texture

BearishSun 10 yıl önce
ebeveyn
işleme
48f91880bc
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3 3
      BansheeEngine/Source/BsGUIButtonBase.cpp

+ 3 - 3
BansheeEngine/Source/BsGUIButtonBase.cpp

@@ -125,10 +125,10 @@ namespace BansheeEngine
 		mImageDesc.height = mLayoutData.area.height;
 
 		const HSpriteTexture& activeTex = getActiveTexture();
-		if(SpriteTexture::checkIsLoaded(activeTex))
-		{
+		if (SpriteTexture::checkIsLoaded(activeTex))
 			mImageDesc.texture = activeTex.getInternalPtr();
-		}
+		else
+			mImageDesc.texture = nullptr;
 
 		mImageDesc.borderLeft = _getStyle()->border.left;
 		mImageDesc.borderRight = _getStyle()->border.right;