Add field actions (still incomplete)

This commit is contained in:
nelle 2024-02-16 04:24:30 -07:00
parent b1fdf74743
commit cddd12bfb3

View file

@ -40,11 +40,36 @@ class LoginWindow private constructor(parent: TApplication, flags: Int) :
//Password
addLabel("Password", CENTERED + 9, CENTERED + 1)
//TODO: Once enter is pressed, getText and save as var, then activate login process.
addPasswordField(CENTERED + 5, CENTERED + 3, 16, false);
addPasswordField(CENTERED + 5, CENTERED + 3, 16, false, "",
// enterAction - function to call when enter key is pressed
object : TAction() {
override fun DO() {
TODO("Not yet implemented")
}
},
// updateAction - function to call when the text is updated
object : TAction() {
override fun DO() {
TODO("Not yet implemented")
}
}
);
//Login
addLabel("Username", CENTERED + 9, CENTERED - 3)
//TODO: Once enter is pressed, getText and save as var, then switch to password field
addPasswordField(CENTERED + 5, CENTERED - 1, 16, false);
addPasswordField(CENTERED + 5, CENTERED - 1, 16, false, "",
// enterAction - function to call when enter key is pressed
object : TAction() {
override fun DO() {
TODO("Not yet implemented")
}
},
// updateAction - function to call when the text is updated
object : TAction() {
override fun DO() {
TODO("Not yet implemented")
}
}
);
}}