mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
world search ui integrated to world portal ui
This commit is contained in:
@@ -121,9 +121,9 @@ class UIItemTextLineInput(
|
||||
private var currentPlaceholderText = ArrayList<Int>(placeholder().toCodePoints()) // the placeholder text may change every time you call it
|
||||
|
||||
|
||||
private val btn1PosX = posX
|
||||
private val btn2PosX = posX + width - WIDTH_ONEBUTTON
|
||||
private val inputPosX = posX + WIDTH_ONEBUTTON + 3
|
||||
private val btn1PosX; get() = posX
|
||||
private val btn2PosX; get() = posX + width - WIDTH_ONEBUTTON
|
||||
private val inputPosX; get() = posX + WIDTH_ONEBUTTON + 3
|
||||
|
||||
var mouseoverUpdateLatch = true // keep it true by default!
|
||||
set(value) {
|
||||
@@ -242,6 +242,13 @@ class UIItemTextLineInput(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Only makes sense when the placeholder returns randomised texts
|
||||
*/
|
||||
fun refreshPlaceholder() {
|
||||
currentPlaceholderText = ArrayList<Int>(placeholder().toCodePoints())
|
||||
}
|
||||
|
||||
override fun inputStrobed(e: TerrarumKeyboardEvent) {
|
||||
val oldActive = isActive
|
||||
|
||||
@@ -496,6 +503,8 @@ class UIItemTextLineInput(
|
||||
private var textDrawOffset = 0
|
||||
|
||||
override fun render(batch: SpriteBatch, camera: Camera) {
|
||||
val posXDelta = posX - oldPosX
|
||||
|
||||
|
||||
val ime = getIME(true)
|
||||
|
||||
@@ -646,6 +655,9 @@ class UIItemTextLineInput(
|
||||
|
||||
batch.color = Color.WHITE
|
||||
super.render(batch, camera)
|
||||
|
||||
|
||||
oldPosX = posX
|
||||
}
|
||||
|
||||
fun getText() = textbufToString()
|
||||
|
||||
Reference in New Issue
Block a user