From 9a03ccf56946c266da3caa55baab3d68d7896edb Mon Sep 17 00:00:00 2001 From: bigguy345 Date: Sat, 20 Dec 2025 18:59:17 +0200 Subject: [PATCH] Cut indent lines height by 2 pixels if highlighted --- .../noppes/npcs/client/gui/util/GuiScriptTextArea.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/noppes/npcs/client/gui/util/GuiScriptTextArea.java b/src/main/java/noppes/npcs/client/gui/util/GuiScriptTextArea.java index 5a0d6a588..45a9888bd 100644 --- a/src/main/java/noppes/npcs/client/gui/util/GuiScriptTextArea.java +++ b/src/main/java/noppes/npcs/client/gui/util/GuiScriptTextArea.java @@ -543,10 +543,14 @@ public class GuiScriptTextArea extends GuiNpcTextField { int px = ClientProxy.Font.width(sb.toString()); int gx = x + LINE_NUMBER_GUTTER_WIDTH + 4 + px - 2; // shift left ~2px for the IntelliJ feel + boolean highlighted = (openLine == highlightedOpenLine && closeLine == highlightedCloseLine); + int guideColor = highlighted ? 0x9933cc00 : 0x33FFFFFF; + int topY = y + (drawStart - scroll.getScrolledLine()) * container.lineHeight; int bottomY = y + (endLine - scroll.getScrolledLine() + 1) * container.lineHeight; - int guideColor = (openLine == highlightedOpenLine && closeLine == highlightedCloseLine) ? 0x9933cc00 : 0x33FFFFFF; - drawRect(gx, topY, gx + 1, bottomY, guideColor); + if(highlighted) + bottomY-=2; + drawRect(gx, topY, gx + 1, bottomY, guideColor); } } int yPos = posY + stringYOffset;