Dieser Commit ist enthalten in:
Ursprung
118b258244
Commit
2cbf095826
@ -332,6 +332,7 @@ public class ScriptEditScreen extends Screen {
|
||||
savedCursorY = -1;
|
||||
savedCursorX = -1;
|
||||
}
|
||||
autoScroll();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -360,6 +361,7 @@ public class ScriptEditScreen extends Screen {
|
||||
boolean valid = insert(chr + "");
|
||||
savedCursorY = -1;
|
||||
savedCursorX = -1;
|
||||
autoScroll();
|
||||
return valid;
|
||||
}
|
||||
|
||||
@ -540,6 +542,14 @@ public class ScriptEditScreen extends Screen {
|
||||
return true;
|
||||
}
|
||||
|
||||
private void autoScroll() {
|
||||
if (cursorY < scroll) {
|
||||
scroll = cursorY;
|
||||
} else if (cursorY >= scroll + ((this.height - 25 - 66) / 9)) {
|
||||
scroll = cursorY - ((this.height - 25 - 66) / 9);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isAtEndOfLine() {
|
||||
return cursorX == lines.get(cursorY).length();
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren