From 896e776c4a586404db52e845fa6b650c97918c03 Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 18 Oct 2024 18:12:21 +0200 Subject: [PATCH] Menu text boxes: don't allow drawing text over the scrollbar --- qcsrc/menu/xonotic/textbox.qc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/menu/xonotic/textbox.qc b/qcsrc/menu/xonotic/textbox.qc index f3e5da9d4..698315615 100644 --- a/qcsrc/menu/xonotic/textbox.qc +++ b/qcsrc/menu/xonotic/textbox.qc @@ -42,7 +42,8 @@ void XonoticTextBox_setText(entity me, string txt) getWrappedLine_remaining = t; while (getWrappedLine_remaining) { - t = getWrappedLine(1, me.realFontSize, (me.allowColors) ? draw_TextWidth_WithColors : draw_TextWidth_WithoutColors); + t = getWrappedLine(1 - me.controlWidth, me.realFontSize, + (me.allowColors) ? draw_TextWidth_WithColors : draw_TextWidth_WithoutColors); bufstr_set(buf, line, t); line++; } -- 2.39.2