moving sprites around

This commit is contained in:
minjaesong
2023-11-11 12:18:00 +09:00
parent df7089f4ac
commit 2f85579fb3
6 changed files with 38 additions and 21 deletions

View File

@@ -553,7 +553,11 @@ class UIItemTextLineInput(
App.fontGameFBO.draw(it, text, -1f*cursorDrawScroll + textDrawOffset, -2f)
} }
textCommitListener(getTextOrPlaceholder())
try {
textCommitListener(getTextOrPlaceholder())
}
catch (_: ConcurrentModificationException) { /* it's a render code, it's fine to do nothing */ }
}
batch.begin()
@@ -685,7 +689,9 @@ class UIItemTextLineInput(
oldPosX = posX
}
/** This function is likely to raise a ConcurrentModificationException */
fun getText() = textbufToString()
/** This function is likely to raise a ConcurrentModificationException */
fun getTextOrPlaceholder(): String = if (textbuf.isEmpty()) currentPlaceholderText.toJavaString() else getText()
fun clearText() {
resetIME()