瀏覽代碼

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

BearishSun 10 年之前
父節點
當前提交
48f91880bc
共有 1 個文件被更改,包括 3 次插入3 次删除
  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;