Przeglądaj źródła

Fixed clip rectangle for text in input box

Marko Pintera 12 lat temu
rodzic
commit
43690633bf
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      BansheeEngine/Source/BsGUIInputBox.cpp

+ 2 - 2
BansheeEngine/Source/BsGUIInputBox.cpp

@@ -745,8 +745,8 @@ namespace BansheeEngine
 
 
 	CM::Rect GUIInputBox::getTextClipRect() const
 	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
 	TEXT_SPRITE_DESC GUIInputBox::getTextDesc() const