mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 21:17:32 +00:00
Refined text cursor rendering
This commit is contained in:
1 parent
10d6d0c408
commit
1ab26a9e84
1 file changed
+2
-2
@@ -236,10 +236,10 @@ public class GuiScriptTextArea extends GuiNpcTextField {
|
||||
data.drawString(x + 1, yPos, 0xFFe0e0e0);
|
||||
|
||||
// Draw cursor
|
||||
if (active && isEnabled() && (cursorCounter / 6) % 2 == 0 && (cursorPosition >= data.start && cursorPosition < data.end || (i == list.size() - 1 && cursorPosition == text.length()))) {
|
||||
if (active && isEnabled() && (cursorCounter / 10) % 2 == 0 && (cursorPosition >= data.start && cursorPosition < data.end || (i == list.size() - 1 && cursorPosition == text.length()))) {
|
||||
int posX = x + ClientProxy.Font.width(
|
||||
line.substring(0, Math.min(cursorPosition - data.start, line.length())));
|
||||
drawRect(posX + 1, yPos, posX + 2, yPos + 1 + container.lineHeight, -3092272);
|
||||
drawRect(posX + 1, yPos, posX + 2, yPos - 2 + container.lineHeight, 0xffffffff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user