Переглянути джерело

Fixed text clipping on GUICanvas

BearishSun 9 роки тому
батько
коміт
879b22bcdc
1 змінених файлів з 3 додано та 3 видалено
  1. 3 3
      Source/BansheeEngine/Source/BsGUICanvas.cpp

+ 3 - 3
Source/BansheeEngine/Source/BsGUICanvas.cpp

@@ -361,11 +361,11 @@ namespace BansheeEngine
 			UINT32 vertexStride = sizeof(Vector2) * 2;
 			const Vector2I& position = mTextData[element.dataId].position;
 			offset += position;
-			clipRect.x += position.x;
-			clipRect.y += position.y;
+			clipRect.x -= position.x;
+			clipRect.y -= position.y;
 
 			element.textSprite->fillBuffer(vertices, uvs, indices, vertexOffset, indexOffset, maxNumVerts, maxNumIndices,
-				vertexStride, indexStride, renderElementIdx, offset, mLayoutData.getLocalClipRect());
+				vertexStride, indexStride, renderElementIdx, offset, clipRect);
 		}
 			break;
 		case CanvasElementType::Triangle: