Просмотр исходного кода

Fixed clip rectangle for text in input box

Marko Pintera 12 лет назад
Родитель
Сommit
43690633bf
1 измененных файлов с 2 добавлено и 2 удалено
  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