now implements new API feature: onReady, switches to lobby screen.
now implements new API feature: onReady, switches to lobby screen.

Now, when initializing the API after the user has entered their login credentials, the code uses the onReady parameter of the .init function. This prevents the code from attempting to do any interaction with the socket before it is ready. However, the code does not have a spot to tell the user if they entered something incorrectly.

Also, upon sending the login request, the code will now load the lobby screen.

Idea: add an onError argument to the API init function. It should be clear what this is for.

SirPython/HTML-Client,Cardshifter/HTML-Client,SirPython/HTML-Client,Cardshifter/HTML-Client