mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
some ui updates
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user