Skip to content

Commit 8b6f34b

Browse files
committed
Fix how the text is drawn in drawTextWithWindow
1 parent 3a2cf87 commit 8b6f34b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ttyd-tools/rel/source/draw.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ void drawTextWithWindow(const char *text, int32_t textPosX, int32_t textPosY, ui
193193
ValuesOut[2]);
194194

195195
// Draw the text
196-
drawTextAndInit(text, textPosX, textPosY, alpha, textColor, false, textScale);
196+
// drawTextMain must be called manually to avoid the hardcoded Y coordinate decrement in drawTextMultipleLines
197+
drawTextInit(alpha, false);
198+
drawTextMain(text, textPosX, textPosY, textColor, false, textScale, -0.f);
197199
}
198200

199201
void drawIcon(int32_t posX, int32_t posY, int16_t iconNum, float scale)

0 commit comments

Comments
 (0)