Skip to content

Commit

Permalink
Account for line spacing in caret
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyDuchess committed Jun 21, 2024
1 parent 47fa459 commit 1d02fc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Scripts/OpenTS2/UI/Skia/SkiaInputField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private void MoveCaretRight()

private void UpdateCaretPosition()
{
_caret.sizeDelta = new Vector2(1, _label.FontSize);
_caret.sizeDelta = new Vector2(1, _label.FontSize + ((_label.LineSpacing - 1f) * _label.FontSize));
if (_selectedCharacter < 0)
{
_caret.anchoredPosition = new Vector2(0f, 0f);
Expand Down

0 comments on commit 1d02fc7

Please sign in to comment.