]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Menu text boxes: don't allow drawing text over the scrollbar
authorterencehill <piuntn@gmail.com>
Fri, 18 Oct 2024 16:12:21 +0000 (18:12 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 18 Oct 2024 16:12:21 +0000 (18:12 +0200)
qcsrc/menu/xonotic/textbox.qc

index f3e5da9d460fa25e0e6b4c2cb7b04091abe62dd1..698315615fa0f92374a93b2598667c087d4bcca1 100644 (file)
@@ -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++;
                }