vanishing particle test

This commit is contained in:
minjaesong
2021-08-17 15:31:00 +09:00
parent 74ae35e9a9
commit 42c09640d0
10 changed files with 121 additions and 15 deletions

View File

@@ -25,7 +25,7 @@ class UITooltip : UICanvas() {
msgBuffer.clear()
msgBuffer.addAll(value.split('\n'))
msgWidth = msgBuffer.fold(0) { acc, s -> font.getWidth(s).let { if (it > acc) it else acc } }
msgWidth = msgBuffer.maxOf { font.getWidth(it) }
}
private val font = AppLoader.fontGame