some ui updates

This commit is contained in:
minjaesong
2023-06-25 20:46:52 +09:00
parent 253db56c4f
commit a497463349
8 changed files with 63 additions and 18 deletions

View File

@@ -66,6 +66,7 @@ class UIItemTextLineInput(
// val enableIMEButton: Boolean = true
var keyFilter: (TerrarumKeyboardEvent) -> Boolean = { true },
val alignment: UIItemTextButton.Companion.Alignment = UIItemTextButton.Companion.Alignment.LEFT,
val defaultValue: (() -> String?)? = null
) : UIItem(parentUI, initialX, initialY) {
init {
@@ -403,6 +404,9 @@ class UIItemTextLineInput(
}
override fun show() {
defaultValue?.let {
setText(it() ?: "")
}
fboUpdateLatch = true
}