2022-06-20 00:18:47 +00:00
|
|
|
import * as status from "../../net/status.js"
|
|
|
|
import {joinGame} from "/scripts/net/netcode.js"
|
|
|
|
import { changeScene } from "/scripts/interface/scene.js"
|
|
|
|
|
|
|
|
document.getElementById("submit").addEventListener("click", e => {
|
|
|
|
submit(e)
|
|
|
|
});
|
|
|
|
|
|
|
|
function submit(event) {
|
|
|
|
const room = document.getElementById("room").value
|
|
|
|
const name = document.getElementById("name").value
|
|
|
|
if (room == '' || name == '' || status.get() == 'disconnected') return
|
|
|
|
joinGame({room: room, name: name})
|
|
|
|
event.preventDefault();
|
2022-06-20 00:59:51 +00:00
|
|
|
|
2022-06-20 00:18:47 +00:00
|
|
|
}
|