mirror of https://github.com/kami-blue/client
[fix] Searching breaks setting value typing, enter key in string setting
This commit is contained in:
parent
486f276526
commit
254d6fc1f6
|
@ -235,6 +235,7 @@ abstract class AbstractKamiGui<S : SettingWindow<*>, E : Any> : GuiScreen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun keyTyped(typedChar: Char, keyCode: Int) {
|
override fun keyTyped(typedChar: Char, keyCode: Int) {
|
||||||
|
if (settingWindow?.listeningChild != null) return
|
||||||
when {
|
when {
|
||||||
keyCode == Keyboard.KEY_BACK || keyCode == Keyboard.KEY_DELETE -> {
|
keyCode == Keyboard.KEY_BACK || keyCode == Keyboard.KEY_DELETE -> {
|
||||||
typedString = ""
|
typedString = ""
|
||||||
|
|
|
@ -59,6 +59,7 @@ class StringButton(val setting: StringSetting) : BooleanSlider(setting.name, 1.0
|
||||||
if (keyState) {
|
if (keyState) {
|
||||||
when (keyCode) {
|
when (keyCode) {
|
||||||
Keyboard.KEY_RETURN -> {
|
Keyboard.KEY_RETURN -> {
|
||||||
|
onStopListening(true)
|
||||||
}
|
}
|
||||||
Keyboard.KEY_BACK, Keyboard.KEY_DELETE -> {
|
Keyboard.KEY_BACK, Keyboard.KEY_DELETE -> {
|
||||||
name = name.substring(0, max(name.length - 1, 0))
|
name = name.substring(0, max(name.length - 1, 0))
|
||||||
|
|
Loading…
Reference in New Issue