Fixed dev console requiring scrolling on small UI settings

This commit is contained in:
yairm210 2025-06-28 23:13:04 +03:00
parent f3c8e2d009
commit e8fd27bf34

View File

@ -104,6 +104,7 @@ class DevConsolePopup(val screen: WorldScreen) : Popup(screen) {
fun String.removeFromEnd(n: Int) = substring(0, (length - n).coerceAtLeast(0))
textField.text = textField.text.removeFromEnd(toRemove) + toAdd
textField.cursorPosition = Int.MAX_VALUE // because the setText implementation actively resets it after the paste it uses (auto capped at length)
pack()
}
private fun onAltDelete() {