Explorar o código

Fixed clip rectangle for text in input box

Marko Pintera %!s(int64=12) %!d(string=hai) anos
pai
achega
43690633bf
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      BansheeEngine/Source/BsGUIInputBox.cpp

+ 2 - 2
BansheeEngine/Source/BsGUIInputBox.cpp

@@ -745,8 +745,8 @@ namespace BansheeEngine
 
 	CM::Rect GUIInputBox::getTextClipRect() const
 	{
-		Rect textBounds = getContentBounds();
-		return Rect(-mTextOffset.x, -mTextOffset.y, textBounds.width, textBounds.height);
+		Rect contentClipRect = getContentClipRect();
+		return Rect(contentClipRect.x - mTextOffset.x, contentClipRect.y - mTextOffset.y, contentClipRect.width, contentClipRect.height);
 	}
 
 	TEXT_SPRITE_DESC GUIInputBox::getTextDesc() const