LoadingScene: use proper class syntax
This commit is contained in:
@@ -20,8 +20,11 @@
|
||||
*/
|
||||
|
||||
import { LoginScene } from "./scenes/LoginScene.js";
|
||||
import { LoadingScene } from "./scenes/LoadingScene.js";
|
||||
import { push_scene } from "./scenes/scene_manager.js";
|
||||
|
||||
// Hide startup loading message
|
||||
document.getElementById("loadingscene").classList.add("hidden");
|
||||
// This works because the LoadingScene is the one that is already active in index.html,
|
||||
// and all other scenes are hidden.
|
||||
new LoadingScene().hide();
|
||||
push_scene(new LoginScene());
|
||||
@@ -26,13 +26,13 @@ import { Scene } from "./scene_manager.js";
|
||||
*/
|
||||
export class LoadingScene {
|
||||
constructor() {
|
||||
let html_scene = document.getElementById("loadingscene");
|
||||
this.show = function () {
|
||||
html_scene.classList.remove("hidden");
|
||||
};
|
||||
this.hide = function () {
|
||||
html_scene.classList.add("hidden");
|
||||
};
|
||||
this.release = function () { };
|
||||
this.html_scene = document.getElementById("loadingscene");
|
||||
}
|
||||
show() {
|
||||
this.html_scene.classList.remove("hidden");
|
||||
}
|
||||
hide() {
|
||||
this.html_scene.classList.add("hidden");
|
||||
}
|
||||
release() { }
|
||||
}
|
||||
Reference in New Issue
Block a user