aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Buttons.hx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Buttons.hx')
-rw-r--r--src/client/Buttons.hx13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx
index 51ba75d..e567331 100644
--- a/src/client/Buttons.hx
+++ b/src/client/Buttons.hx
@@ -209,13 +209,12 @@ class Buttons {
static function initChatInput(main:Main):Void {
final guestName:InputElement = cast ge("#guestname");
guestName.onkeydown = e -> {
- if (guestName.value.length == 0) return;
- if (e.keyCode == 13) main.send({
- type: Login,
- login: {
- clientName: guestName.value
- }
- });
+ if (e.keyCode == 13) main.guestLogin(guestName.value);
+ }
+
+ final guestPass:InputElement = cast ge("#guestpass");
+ guestPass.onkeydown = e -> {
+ if (e.keyCode == 13) main.userLogin(guestName.value, guestPass.value);
}
final chatLine:InputElement = cast ge("#chatline");
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage