Skip to content

Commit 7abc4ac

Browse files
committed
Fixed text labels sometimes drawing in the wrong order in the talk window
1 parent 8215b8f commit 7abc4ac

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Assets/Scripts/Game/UserInterface/TextLabel.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,9 @@ void DrawLabelSingleCall()
280280
+ g.x * scaleX
281281
+ info.offset.x * sdfScale;
282282

283-
float rawDestY = glyphH
284-
+ baseline
285-
- info.offset.y * sdfScale
286-
- g.y * scaleY;
283+
float rawDestY = (glyphH + baseline) // Base position relative to TextLabel top
284+
+ g.y * scaleY // Vertical offset from top of TextLabel
285+
- info.offset.y * sdfScale; // Glyph-specific vertical adjustment
287286
float y = Rectangle.y + rawDestY;
288287

289288
// pixel-perfect rounding

0 commit comments

Comments
 (0)