Skip to content

Commit b5ce772

Browse files
authored
TextEntry now renders the Caret properly with the move to commandlists (#4510)
https://files.facepunch.com/CarsonKompon/2026/April/09_15-17-LightgoldenrodSeabird.mp4
1 parent 233e2bc commit b5ce772

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

game/addons/base/code/UI/Controls/TextEntry.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,13 @@ public override void BuildContentCommandList( CommandList commandList, ref Rende
547547
var color = ComputedStyle.CaretColor ?? ComputedStyle.FontColor ?? Color.Black;
548548
color.a *= blink ? 1.0f : 0f;
549549

550+
commandList.Attributes.Set( "BoxPosition", new Vector2( caret.Left, caret.Top ) );
551+
commandList.Attributes.Set( "BoxSize", new Vector2( caret.Width, caret.Height ) );
552+
commandList.Attributes.Set( "BorderRadius", Vector4.Zero );
553+
commandList.Attributes.Set( "HasBorder", 0 );
554+
commandList.Attributes.SetCombo( "D_BACKGROUND_IMAGE", 0 );
555+
commandList.Attributes.SetCombo( "D_BORDER_IMAGE", 0 );
556+
commandList.Attributes.SetCombo( "D_BLENDMODE", BlendMode.Normal );
550557
commandList.DrawQuad( caret, Material.UI.Box, color );
551558
}
552559

0 commit comments

Comments
 (0)