mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 11:24:56 -04:00
eros: register key account add callbacks in postInit, fixes #37
This commit is contained in:
parent
fa84eff093
commit
129ca3f78e
@ -81,6 +81,11 @@ class MojangAddController(
|
|||||||
passwordFX.textProperty().addListener { _, _, _ ->
|
passwordFX.textProperty().addListener { _, _, _ ->
|
||||||
validate()
|
validate()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun postInit() {
|
||||||
|
super.postInit()
|
||||||
|
|
||||||
stage.scene.root.addEventFilter(KeyEvent.KEY_PRESSED) {
|
stage.scene.root.addEventFilter(KeyEvent.KEY_PRESSED) {
|
||||||
if (it.code == KeyCode.ENTER) {
|
if (it.code == KeyCode.ENTER) {
|
||||||
login()
|
login()
|
||||||
|
@ -66,6 +66,11 @@ class OfflineAddController(
|
|||||||
usernameFX.textProperty().addListener { _, _, new ->
|
usernameFX.textProperty().addListener { _, _, new ->
|
||||||
addButtonFX.isDisable = !ProtocolDefinition.MINECRAFT_NAME_VALIDATOR.matcher(new).matches()
|
addButtonFX.isDisable = !ProtocolDefinition.MINECRAFT_NAME_VALIDATOR.matcher(new).matches()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun postInit() {
|
||||||
|
super.postInit()
|
||||||
|
|
||||||
stage.scene.root.addEventFilter(KeyEvent.KEY_PRESSED) {
|
stage.scene.root.addEventFilter(KeyEvent.KEY_PRESSED) {
|
||||||
if (it.code == KeyCode.ENTER) {
|
if (it.code == KeyCode.ENTER) {
|
||||||
add()
|
add()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user