From: terencehill Date: Fri, 18 Oct 2024 16:12:21 +0000 (+0200) Subject: Menu text boxes: don't allow drawing text over the scrollbar X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=896e776c4a586404db52e845fa6b650c97918c03;p=xonotic%2Fxonotic-data.pk3dir.git Menu text boxes: don't allow drawing text over the scrollbar --- 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++; }