mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-27 22:32:57 +00:00
Improved interaction between SearchReplaceBar and GoToLineDialog
This commit is contained in:
1 parent
762d52f658
commit
d06e7df1a0
2 files changed
+23
-9
No files matched your search
@@ -118,7 +118,7 @@ public class GoToLineDialog {
|
||||
}
|
||||
|
||||
public void toggle() {
|
||||
if (visible) {
|
||||
if (visible && focused) {
|
||||
close();
|
||||
} else {
|
||||
show();
|
||||
@@ -129,6 +129,9 @@ public class GoToLineDialog {
|
||||
return visible && focused;
|
||||
}
|
||||
|
||||
public void unfocus() {
|
||||
focused = false;
|
||||
}
|
||||
// ==================== RENDERING ====================
|
||||
|
||||
public void draw(int mouseX, int mouseY) {
|
||||
@@ -164,7 +167,7 @@ public class GoToLineDialog {
|
||||
int fieldY = y + padding + 14 + 5;
|
||||
textFieldWidth = dialogWidth - padding * 2;
|
||||
drawTextField(fieldX, fieldY, textFieldWidth, textFieldHeight, inputText, cursor,
|
||||
selectionStart, selectionEnd, scrollOffset, true);
|
||||
selectionStart, selectionEnd, scrollOffset, focused);
|
||||
|
||||
if (inputText.isEmpty())
|
||||
font.drawString("[Line][:Column]", x + padding + 6, y + padding + 23, 0xFF888888);
|
||||
|
||||
Reference in new issue
Block a user